diff --git a/LCU/Maintenance/MDB_tools/test/t_client.py b/LCU/Maintenance/MDB_tools/test/t_client.py index 8b5257c4879ff06de5ca133dbd58c84375248d74..f824c6599cd6c8b5647075c983f93d118a3558a7 100644 --- a/LCU/Maintenance/MDB_tools/test/t_client.py +++ b/LCU/Maintenance/MDB_tools/test/t_client.py @@ -48,9 +48,9 @@ class TESTMDBClient(unittest.TestCase): mocked_post.return_value = response full_address = '/'.join([address, compose_api_url_for_given_test_type(station_test_content)]) - result = send_stationtest_rtsm_content_to_address('http://testaddress', station_test_content) + result = send_stationtest_rtsm_content_to_address('http://testaddress', dict(content=station_test_content)) self.assertTrue(mocked_post.called) - mocked_post.assert_called_with(full_address, data=station_test_content) + mocked_post.assert_called_with(full_address, data=dict(content=station_test_content)) self.assertTrue(result) @patch('requests.post') @@ -61,18 +61,18 @@ class TESTMDBClient(unittest.TestCase): mocked_post.return_value = response full_address = '/'.join([address, compose_api_url_for_given_test_type(station_test_content)]) - result = send_stationtest_rtsm_content_to_address('http://testaddress', station_test_content) + result = send_stationtest_rtsm_content_to_address('http://testaddress', dict(content=station_test_content)) self.assertTrue(mocked_post.called) - mocked_post.assert_called_with(full_address, data=station_test_content) + mocked_post.assert_called_with(full_address, data=dict(content=station_test_content)) self.assertFalse(result) def test_compose_api_url_for_given_test_type_is_rtsm(self): rtsm_test_content = load_rtsm_test() - self.assertEqual(compose_api_url_for_given_test_type(rtsm_test_content), 'rtsm/insert_raw') + self.assertEqual(compose_api_url_for_given_test_type(rtsm_test_content), 'rtsm/raw/insert') def test_compose_api_url_for_given_test_type_is_station_test(self): station_test_content = load_station_test() - self.assertEqual(compose_api_url_for_given_test_type(station_test_content), 'stationtests/insert_raw') + self.assertEqual(compose_api_url_for_given_test_type(station_test_content), 'stationtests/raw/insert') def test_compose_api_url_for_given_test_type_raises_content_unrecognized(self): with self.assertRaises(ValueError): diff --git a/LCU/Maintenance/MDB_tools/test/t_station_tests_watchdog.py b/LCU/Maintenance/MDB_tools/test/t_station_tests_watchdog.py index 387be781937182a558a50c3a01003ed66aadc465..37fb53efc83a754efa9514379a65582d038deefb 100644 --- a/LCU/Maintenance/MDB_tools/test/t_station_tests_watchdog.py +++ b/LCU/Maintenance/MDB_tools/test/t_station_tests_watchdog.py @@ -191,7 +191,7 @@ class TestStationTestsWatchdog(unittest.TestCase): mock_logging, partial_mock_sys): mock_arguments = [self.mock_path, self.mock_filename, '--addr', self.mock_address] - partial_mock_sys.argv = mock_arguments + partial_mock_sys.argv = ['program_filename'] + mock_arguments mock_observer = MagicMock() mock_instantiate_file_creation_event_observer.return_value = mock_observer