From d85f9007d2468a4d9cb6480f0fcfadc7660af4a8 Mon Sep 17 00:00:00 2001 From: Raymond Oung Date: Sat, 14 Mar 2020 12:44:27 +0900 Subject: [PATCH] Renames location to waypoint to fix test scripts --- test/test_app.py | 8 ++++---- test/test_listener.py | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/test/test_app.py b/test/test_app.py index 5672f8a..36e8765 100755 --- a/test/test_app.py +++ b/test/test_app.py @@ -80,7 +80,7 @@ def on_message(client, log_filename, message): client.publish('temi/00119452440/status/info', json.dumps({ 'timestamp': datetime.now().strftime("%Y%m%d_%H%M%S"), 'battery_percentage': 50, - 'locations': ['home base', 'a', 'b', 'c'], + 'waypoint_list': ['home base', 'a', 'b', 'c'], }), qos=0) time.sleep(1) @@ -88,7 +88,7 @@ def on_message(client, log_filename, message): client.publish('temi/00119462420/status/info', json.dumps({ 'timestamp': datetime.now().strftime("%Y%m%d_%H%M%S"), 'battery_percentage': 95, - 'locations': ['home base', 'd', 'e', 'f'], + 'waypoint_list': ['home base', 'd', 'e', 'f'], }), qos=0) time.sleep(1) @@ -97,7 +97,7 @@ def on_message(client, log_filename, message): client.publish('temi/00119452440/command/move/forward', json.dumps({ 'timestamp': datetime.now().strftime("%Y%m%d_%H%M%S"), 'battery_percentage': 50, - 'locations': ['home base', 'a', 'b', 'c'], + 'waypoint_list': ['home base', 'a', 'b', 'c'], }), qos=0) time.sleep(1) @@ -105,6 +105,6 @@ def on_message(client, log_filename, message): client.publish('temi/00119452440/command/move/backward', json.dumps({ 'timestamp': datetime.now().strftime("%Y%m%d_%H%M%S"), 'battery_percentage': 95, - 'locations': ['home base', 'd', 'e', 'f'], + 'waypoint_list': ['home base', 'd', 'e', 'f'], }), qos=0) time.sleep(1) diff --git a/test/test_listener.py b/test/test_listener.py index 19072e5..2c6c514 100755 --- a/test/test_listener.py +++ b/test/test_listener.py @@ -16,7 +16,8 @@ CLIENT_ID = 'test-listener' # MQTT broker -MQTT_BROKER_HOST = '192.168.0.118' +MQTT_BROKER_HOST = 'localhost' +# MQTT_BROKER_HOST = '192.168.0.118' MQTT_BROKER_PORT = 1883 # connection parameters