diff --git a/tests/test_news_flash_api.py b/tests/test_news_flash_api.py index c8838885..36789220 100644 --- a/tests/test_news_flash_api.py +++ b/tests/test_news_flash_api.py @@ -93,7 +93,7 @@ def test_add_location_qualifiction_history(self, can, current_user, get_current_ with patch("anyway.views.news_flash.api.db", db_mock): with patch("anyway.app_and_db.db", db_mock): mock_request = unittest.mock.MagicMock() - values = {"newsflash_location_qualification": "manual", "road_segment_id": 100, "road1": 1} + values = {"newsflash_location_qualification": "manual", "road_segment_id": "100", "road1": "1"} mock_request.values.get = lambda key: values.get(key) with patch("anyway.views.news_flash.api.request", mock_request): id = self.session.query(NewsFlash).all()[0].id @@ -135,7 +135,7 @@ def _test_update_news_flash_qualifying_manual_with_location(self): db_mock = unittest.mock.MagicMock() db_mock.session = self.session mock_request = unittest.mock.MagicMock() - values = {"newsflash_location_qualification": "manual", "road_segment_id": 100, "road1": 1} + values = {"newsflash_location_qualification": "manual", "road_segment_id": "100", "road1": "1"} mock_request.values.get = lambda key: values.get(key) road_segment = RoadSegments( segment_id=100, @@ -170,7 +170,7 @@ def _test_update_news_flash_qualifying_not_manual_with_location(self): also a new location """ mock_request = unittest.mock.MagicMock() - values = {"newsflash_location_qualification": "rejected", "road_segment_name": "road", "road1": 1} + values = {"newsflash_location_qualification": "rejected", "road_segment_name": "road", "road1": "1"} mock_request.values.get = lambda key: values.get(key) with patch("anyway.views.news_flash.api.request", mock_request): id = self.session.query(NewsFlash).all()[0].id