Beispiel #1
0
    def test_on_message(self):

        testobj = MsgAPI()
        client, status = testobj.client_run()
        client.loop_start()
        time.sleep(5)
        client.loop_stop()
Beispiel #2
0
 def test_publish_node_cert(self):
     testobj = MsgAPI()
     obj, result = testobj.client_connect()
     if result == 0:
         pStatus = testobj.publish_node_cert()
         if pStatus != 0:
             print("publish node status: " + str(pStatus))
             self.assertNotEqual(pStatus, 0)
Beispiel #3
0
    def test_client_init(self):

        testobj = MsgAPI()
        obj, result = testobj.client_init()
        if result == 0:
            self.assertEqual(result, 0)
        else:
            self.assertEqual(result, 0)
Beispiel #4
0
    def test_client_disconnect(self):

        testobj = MsgAPI()
        client, result = testobj.client_connect()
        if result == 0:
            disconnect_status = testobj.client_disconnect()
            print("disconnect status: " + str(disconnect_status))
            if disconnect_status == 0:
                self.assertEqual(disconnect_status, 0)
Beispiel #5
0
 def test_client_run(self):
     testobj = MsgAPI()
     client = testobj.client_run()
Beispiel #6
0
 def test_death_certificate(self):
     testobj = MsgAPI()
     payload = testobj.get_death_certificate()
     print("death payload:" + str(payload))