From bda63dbcdf6c8259c9fa9f39823f5ceeaa423e89 Mon Sep 17 00:00:00 2001 From: Justin Haze Date: Wed, 28 Feb 2024 10:13:20 -0700 Subject: [PATCH] fix tests --- scos_actions/actions/tests/test_sync_gps.py | 3 ++- scos_actions/discover/tests/test_yaml.py | 2 +- scos_actions/hardware/tests/test_sensor.py | 8 +++++--- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/scos_actions/actions/tests/test_sync_gps.py b/scos_actions/actions/tests/test_sync_gps.py index ed7b2691..71c3cd4c 100644 --- a/scos_actions/actions/tests/test_sync_gps.py +++ b/scos_actions/actions/tests/test_sync_gps.py @@ -30,8 +30,9 @@ def callback(sender, **kwargs): location_action_completed.connect(callback) action = test_actions["test_sync_gps"] + sigan = MockSignalAnalyzer() sensor = Sensor( - signal_analyzer=MockSignalAnalyzer(), capabilities={}, gps=MockGPS() + signal_analyzer=sigan, capabilities={}, gps=MockGPS(sigan) ) if sys.platform == "linux": action(sensor, SYNC_GPS, 1) diff --git a/scos_actions/discover/tests/test_yaml.py b/scos_actions/discover/tests/test_yaml.py index 473b39dd..953f5e3f 100644 --- a/scos_actions/discover/tests/test_yaml.py +++ b/scos_actions/discover/tests/test_yaml.py @@ -25,7 +25,7 @@ """ sigan = MockSignalAnalyzer() -gps = MockGPS() +gps = MockGPS(sigan) def test_load_from_yaml_existing(): diff --git a/scos_actions/hardware/tests/test_sensor.py b/scos_actions/hardware/tests/test_sensor.py index 216d626a..50b3338f 100644 --- a/scos_actions/hardware/tests/test_sensor.py +++ b/scos_actions/hardware/tests/test_sensor.py @@ -7,8 +7,9 @@ def test_sensor(): + sigan = MockSignalAnalyzer() sensor = Sensor( - signal_analyzer=MockSignalAnalyzer(), capabilities={}, gps=MockGPS() + signal_analyzer=sigan, capabilities={}, gps=MockGPS(sigan) ) assert sensor is not None assert sensor.signal_analyzer is not None @@ -23,8 +24,9 @@ def test_set_get_preselector(): def test_set_get_gps(): - gps = MockGPS() - sensor = Sensor(signal_analyzer=MockSignalAnalyzer(), capabilities={}) + sigan = MockSignalAnalyzer() + gps = MockGPS(sigan) + sensor = Sensor(signal_analyzer=sigan, capabilities={}) sensor.gps = gps assert sensor.gps == gps