@@ -81,7 +81,10 @@ def test_process_geojson_round_and_remove_osm_keys(self):
8181 "features" : [
8282 {
8383 "type" : "Feature" ,
84- "geometry" : {"type" : "Point" , "coordinates" : [12.3456789 , - 98.7654321 ]},
84+ "geometry" : {
85+ "type" : "Point" ,
86+ "coordinates" : [12.3456789 , - 98.7654321 ],
87+ },
8588 "properties" : {
8689 "name" : "A" ,
8790 "osm_id" : 123 ,
@@ -113,13 +116,18 @@ def test_process_geojson_single_feature_and_list_variants(self):
113116 }
114117 out1 = process_geojson (feat , precision = 4 )
115118 self .assertIsInstance (out1 , dict )
116- self .assertEqual (out1 ["geometry" ]["coordinates" ], [round (1.23456789 , 4 ), round (2.3456789 , 4 )])
119+ self .assertEqual (
120+ out1 ["geometry" ]["coordinates" ], [round (1.23456789 , 4 ), round (2.3456789 , 4 )]
121+ )
117122 self .assertNotIn ("osm" , out1 .get ("properties" , {}))
118123
119124 lst = [feat ]
120125 out2 = process_geojson (lst , precision = 3 )
121126 self .assertIsInstance (out2 , list )
122- self .assertEqual (out2 [0 ]["geometry" ]["coordinates" ], [round (1.23456789 , 3 ), round (2.3456789 , 3 )])
127+ self .assertEqual (
128+ out2 [0 ]["geometry" ]["coordinates" ],
129+ [round (1.23456789 , 3 ), round (2.3456789 , 3 )],
130+ )
123131
124132 @patch ("tasks.geojson.update_geojson_files_precision.query_unprocessed_feeds" )
125133 def test_handler_uploads_and_updates_feed_info (self , mock_query ):
@@ -128,7 +136,10 @@ def test_handler_uploads_and_updates_feed_info(self, mock_query):
128136 "features" : [
129137 {
130138 "type" : "Feature" ,
131- "geometry" : {"type" : "Point" , "coordinates" : [100.1234567 , 0.9876543 ]},
139+ "geometry" : {
140+ "type" : "Point" ,
141+ "coordinates" : [100.1234567 , 0.9876543 ],
142+ },
132143 "properties" : {"id" : "node/1" , "keep" : "x" },
133144 }
134145 ],
@@ -149,7 +160,11 @@ def test_handler_uploads_and_updates_feed_info(self, mock_query):
149160 fake_feed = types .SimpleNamespace (
150161 stable_id = feed_stable_id ,
151162 geolocation_file_created_date = None ,
152- gtfsdatasets = [types .SimpleNamespace (bounding_box = types .SimpleNamespace (id = "bbid" ), downloaded_date = None )],
163+ gtfsdatasets = [
164+ types .SimpleNamespace (
165+ bounding_box = types .SimpleNamespace (id = "bbid" ), downloaded_date = None
166+ )
167+ ],
153168 )
154169
155170 mock_query .return_value = [fake_feed ]
@@ -168,7 +183,12 @@ def commit(self):
168183
169184 fake_db = FakeDBSession ()
170185
171- payload = {"bucket_name" : "any-bucket" , "dry_run" : False , "precision" : 5 , "limit" : 1 }
186+ payload = {
187+ "bucket_name" : "any-bucket" ,
188+ "dry_run" : False ,
189+ "precision" : 5 ,
190+ "limit" : 1 ,
191+ }
172192
173193 # Inject modules into sys.modules for the duration of the handler call
174194 with patch .dict (sys .modules , {"google.cloud" : cloud_mod , "google" : google_mod }):
0 commit comments