Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jhazentia committed Feb 28, 2024
1 parent b36f36d commit bda63db
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
3 changes: 2 additions & 1 deletion scos_actions/actions/tests/test_sync_gps.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion scos_actions/discover/tests/test_yaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"""

sigan = MockSignalAnalyzer()
gps = MockGPS()
gps = MockGPS(sigan)


def test_load_from_yaml_existing():
Expand Down
8 changes: 5 additions & 3 deletions scos_actions/hardware/tests/test_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down

0 comments on commit bda63db

Please sign in to comment.