def test_store_passive_message(self):
        """JRPC test: services.communiations.storePassiveMessage (2)
        Simple test for validating the storage of passive messages.
        """
        if self.__verbose_testing:
            print('>>> test_store_passive_message')

        self.assertEqual(
            comms_jrpc.store_passive_message(
                groundstation_id=self.__gs_1_id,
                timestamp=misc.get_utc_timestamp(misc.get_now_utc()),
                doppler_shift=0.0,
                message=db_tools.MESSAGE_BASE64
            ),
            1,
            'Message ID expected not to be none'
        )

        message = comms_models.PassiveMessage.objects.get(pk=1).message
        self.assertEqual(
            db_tools.MESSAGE_BASE64.decode(), message,
            'In-database stored message differs, diff = ' + str(
                difflib.ndiff(db_tools.MESSAGE_BASE64.decode(), message))
        )

        if self.__verbose_testing:
            print('>>> message_1 (RAW) = ' + str(message))
            print('>>> message_1 (STR) = ' - str(base64.b64decode(message)))

        self.assertEqual(
            comms_jrpc.store_passive_message(
                groundstation_id=self.__gs_1_id,
                timestamp=misc.get_utc_timestamp(misc.get_now_utc()),
                doppler_shift=0.0,
                message=db_tools.MESSAGE_BASE64
            ),
            2,
            'Message ID expected to be 2'
        )

        message = comms_models.PassiveMessage.objects.get(pk=2).message
        self.assertEqual(
            db_tools.MESSAGE_BASE64.decode(), message,
            'In-database stored message differs, diff = ' + str(
                difflib.ndiff(db_tools.MESSAGE_BASE64.decode(), message))
        )

        if self.__verbose_testing:
            print('>>> message_2 (RAW) = ' + str(message))
            print('>>> message_2 (STR) = ' + str(base64.b64decode(message)))
dataset/ETHPy150Open satnet-project/server/services/communications/tests/test_jrpc.py/TestPassiveCommunications.test_store_passive_message/operator `+` -> `-`