Skip to content

Commit c384925

Browse files
committed
wip: migrating hub
1 parent 4c4d2ab commit c384925

2 files changed

Lines changed: 15 additions & 10 deletions

File tree

tests/modules/test_lan.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ class TestLan(unittest.TestCase):
1414
''' Tests for the lan module '''
1515

1616
def test_monitor_network(self):
17+
'''
18+
Confirm that the network monitor is running.
19+
'''
1720
with patch('modules.rec_lan.test_network') as mocked_test_network:
1821
mocked_test_network.return_value = 0
1922

tests/test_updater.py

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,23 @@ class TestUpdater(unittest.TestCase):
1616
'''Collection of tests.'''
1717

1818
def test_get_current_versions(self):
19-
'''Verify that the current versions are returned.'''
19+
'''
20+
Verify that the current versions are returned.
21+
'''
2022
system_json = StringIO("""{
21-
"serial": "536780dfe639468e8e23fc568006950d",
22-
"timezone": "America/New_York",
23-
"CurrentVersion": "0_0_0",
24-
"HUBid": 40,
25-
"Token": "5a12ff36eed2f0647a48af62e635eb8cfd4c5979",
26-
"facility": "3b9fdc97-9649-4c80-8b48-10df647bd032"
27-
}""")
23+
"serial": "536780dfe639468e8e23fc568006950d",
24+
"timezone": "America/New_York",
25+
"CurrentVersion": "0_0_0",
26+
"HUBid": 40,
27+
"Token": "5a12ff36eed2f0647a48af62e635eb8cfd4c5979",
28+
"facility": "3b9fdc97-9649-4c80-8b48-10df647bd032"
29+
}""")
2830

2931
with patch('updater.open') as mock_open:
3032
mock_open.side_effect = [system_json, system_json]
31-
updater.current_hub_version()
32-
# hub_updater.update_version_name()
33+
self.assertEqual(updater.current_hub_version(), "0_0_0")
3334
mock_open.assert_called()
3435

36+
3537
if __name__ == '__main__':
3638
unittest.main()

0 commit comments

Comments
 (0)