@@ -93,7 +93,7 @@ def test_add_location_qualifiction_history(self, can, current_user, get_current_
93
93
with patch ("anyway.views.news_flash.api.db" , db_mock ):
94
94
with patch ("anyway.app_and_db.db" , db_mock ):
95
95
mock_request = unittest .mock .MagicMock ()
96
- values = {"newsflash_location_qualification" : "manual" , "road_segment_id" : 100 , "road1" : 1 }
96
+ values = {"newsflash_location_qualification" : "manual" , "road_segment_id" : " 100" , "road1" : "1" }
97
97
mock_request .values .get = lambda key : values .get (key )
98
98
with patch ("anyway.views.news_flash.api.request" , mock_request ):
99
99
id = self .session .query (NewsFlash ).all ()[0 ].id
@@ -135,7 +135,7 @@ def _test_update_news_flash_qualifying_manual_with_location(self):
135
135
db_mock = unittest .mock .MagicMock ()
136
136
db_mock .session = self .session
137
137
mock_request = unittest .mock .MagicMock ()
138
- values = {"newsflash_location_qualification" : "manual" , "road_segment_id" : 100 , "road1" : 1 }
138
+ values = {"newsflash_location_qualification" : "manual" , "road_segment_id" : " 100" , "road1" : "1" }
139
139
mock_request .values .get = lambda key : values .get (key )
140
140
road_segment = RoadSegments (
141
141
segment_id = 100 ,
@@ -170,7 +170,7 @@ def _test_update_news_flash_qualifying_not_manual_with_location(self):
170
170
also a new location
171
171
"""
172
172
mock_request = unittest .mock .MagicMock ()
173
- values = {"newsflash_location_qualification" : "rejected" , "road_segment_name" : "road" , "road1" : 1 }
173
+ values = {"newsflash_location_qualification" : "rejected" , "road_segment_name" : "road" , "road1" : "1" }
174
174
mock_request .values .get = lambda key : values .get (key )
175
175
with patch ("anyway.views.news_flash.api.request" , mock_request ):
176
176
id = self .session .query (NewsFlash ).all ()[0 ].id
0 commit comments