@@ -130,7 +130,9 @@ def test_collection() -> Dict:
130130
131131
132132async def create_collection (txn_client : TransactionsClient , collection : Dict ) -> None :
133- await txn_client .create_collection (api .Collection (** dict (collection )), request = MockRequest , refresh = True )
133+ await txn_client .create_collection (
134+ api .Collection (** dict (collection )), request = MockRequest , refresh = True
135+ )
134136
135137
136138async def create_item (txn_client : TransactionsClient , item : Dict ) -> None :
@@ -200,14 +202,18 @@ async def app():
200202 settings = AsyncSettings ()
201203
202204 aggregation_extension = AggregationExtension (
203- client = EsAsyncAggregationClient (database = database , session = None , settings = settings )
205+ client = EsAsyncAggregationClient (
206+ database = database , session = None , settings = settings
207+ )
204208 )
205209 aggregation_extension .POST = EsAggregationExtensionPostRequest
206210 aggregation_extension .GET = EsAggregationExtensionGetRequest
207211
208212 search_extensions = [
209213 TransactionExtension (
210- client = TransactionsClient (database = database , session = None , settings = settings ),
214+ client = TransactionsClient (
215+ database = database , session = None , settings = settings
216+ ),
211217 settings = settings ,
212218 ),
213219 SortExtension (),
@@ -241,7 +247,9 @@ async def app_client(app):
241247 await create_index_templates ()
242248 await create_collection_index ()
243249
244- async with AsyncClient (transport = ASGITransport (app = app ), base_url = "http://test-server" ) as c :
250+ async with AsyncClient (
251+ transport = ASGITransport (app = app ), base_url = "http://test-server"
252+ ) as c :
245253 yield c
246254
247255
@@ -250,14 +258,18 @@ async def app_rate_limit():
250258 settings = AsyncSettings ()
251259
252260 aggregation_extension = AggregationExtension (
253- client = EsAsyncAggregationClient (database = database , session = None , settings = settings )
261+ client = EsAsyncAggregationClient (
262+ database = database , session = None , settings = settings
263+ )
254264 )
255265 aggregation_extension .POST = EsAggregationExtensionPostRequest
256266 aggregation_extension .GET = EsAggregationExtensionGetRequest
257267
258268 search_extensions = [
259269 TransactionExtension (
260- client = TransactionsClient (database = database , session = None , settings = settings ),
270+ client = TransactionsClient (
271+ database = database , session = None , settings = settings
272+ ),
261273 settings = settings ,
262274 ),
263275 SortExtension (),
@@ -296,7 +308,9 @@ async def app_client_rate_limit(app_rate_limit):
296308 await create_index_templates ()
297309 await create_collection_index ()
298310
299- async with AsyncClient (transport = ASGITransport (app = app_rate_limit ), base_url = "http://test-server" ) as c :
311+ async with AsyncClient (
312+ transport = ASGITransport (app = app_rate_limit ), base_url = "http://test-server"
313+ ) as c :
300314 yield c
301315
302316
@@ -338,14 +352,18 @@ async def app_basic_auth():
338352 settings = AsyncSettings ()
339353
340354 aggregation_extension = AggregationExtension (
341- client = EsAsyncAggregationClient (database = database , session = None , settings = settings )
355+ client = EsAsyncAggregationClient (
356+ database = database , session = None , settings = settings
357+ )
342358 )
343359 aggregation_extension .POST = EsAggregationExtensionPostRequest
344360 aggregation_extension .GET = EsAggregationExtensionGetRequest
345361
346362 search_extensions = [
347363 TransactionExtension (
348- client = TransactionsClient (database = database , session = None , settings = settings ),
364+ client = TransactionsClient (
365+ database = database , session = None , settings = settings
366+ ),
349367 settings = settings ,
350368 ),
351369 SortExtension (),
@@ -382,7 +400,9 @@ async def app_client_basic_auth(app_basic_auth):
382400 await create_index_templates ()
383401 await create_collection_index ()
384402
385- async with AsyncClient (transport = ASGITransport (app = app_basic_auth ), base_url = "http://test-server" ) as c :
403+ async with AsyncClient (
404+ transport = ASGITransport (app = app_basic_auth ), base_url = "http://test-server"
405+ ) as c :
386406 yield c
387407
388408
@@ -423,7 +443,9 @@ async def route_dependencies_app():
423443 settings = AsyncSettings ()
424444 extensions = [
425445 TransactionExtension (
426- client = TransactionsClient (database = database , session = None , settings = settings ),
446+ client = TransactionsClient (
447+ database = database , session = None , settings = settings
448+ ),
427449 settings = settings ,
428450 ),
429451 SortExtension (),
@@ -464,10 +486,14 @@ async def route_dependencies_client(route_dependencies_app):
464486
465487
466488def build_test_app ():
467- TRANSACTIONS_EXTENSIONS = get_bool_env ("ENABLE_TRANSACTIONS_EXTENSIONS" , default = True )
489+ TRANSACTIONS_EXTENSIONS = get_bool_env (
490+ "ENABLE_TRANSACTIONS_EXTENSIONS" , default = True
491+ )
468492 settings = AsyncSettings ()
469493 aggregation_extension = AggregationExtension (
470- client = EsAsyncAggregationClient (database = database , session = None , settings = settings )
494+ client = EsAsyncAggregationClient (
495+ database = database , session = None , settings = settings
496+ )
471497 )
472498 aggregation_extension .POST = EsAggregationExtensionPostRequest
473499 aggregation_extension .GET = EsAggregationExtensionGetRequest
@@ -483,7 +509,9 @@ def build_test_app():
483509 search_extensions .insert (
484510 0 ,
485511 TransactionExtension (
486- client = TransactionsClient (database = database , session = None , settings = settings ),
512+ client = TransactionsClient (
513+ database = database , session = None , settings = settings
514+ ),
487515 settings = settings ,
488516 ),
489517 )
0 commit comments