@@ -168,7 +168,9 @@ def test_getting_and_deleting_cheuk(schema_test_db):
168168 cheuk_setup .friend_of = {cheuk_setup }
169169 cheuk_setup .member_of = Team .IT
170170
171- client .insert_document ([cheuk_setup ], commit_msg = "Setup for test_getting_and_deleting_cheuk" )
171+ client .insert_document (
172+ [cheuk_setup ], commit_msg = "Setup for test_getting_and_deleting_cheuk"
173+ )
172174
173175 # Test: Load and verify
174176 new_schema = WOQLSchema ()
@@ -194,7 +196,9 @@ def test_insert_cheuk_again(schema_test_db):
194196 uk_setup = Country ()
195197 uk_setup .name = "UK Test 2"
196198 uk_setup .perimeter = []
197- client .insert_document ([uk_setup ], commit_msg = "Setup country for test_insert_cheuk_again" )
199+ client .insert_document (
200+ [uk_setup ], commit_msg = "Setup country for test_insert_cheuk_again"
201+ )
198202
199203 # Test: Load country and create employee
200204 new_schema = WOQLSchema ()
@@ -248,7 +252,10 @@ def test_insert_cheuk_again(schema_test_db):
248252 if item .get ("@type" ) == "Country" and item .get ("name" ) == "UK Test 2" :
249253 assert item ["perimeter" ]
250254 found_country = True
251- elif item .get ("@type" ) == "Employee" and item .get ("@id" ) == "Employee/cheuk_test_2" :
255+ elif (
256+ item .get ("@type" ) == "Employee"
257+ and item .get ("@id" ) == "Employee/cheuk_test_2"
258+ ):
252259 assert item ["address_of" ]["postal_code" ] == "A12 345"
253260 assert item ["address_of" ]["street" ] == "123 Abc Street"
254261 assert item ["name" ] == "Cheuk Test 2"
@@ -300,7 +307,9 @@ def test_get_data_version(schema_test_db):
300307 cheuk .member_of = Team .IT
301308 cheuk ._id = "cheuk_test_3"
302309
303- client .insert_document ([location , uk , cheuk ], commit_msg = "Setup for test_get_data_version" )
310+ client .insert_document (
311+ [location , uk , cheuk ], commit_msg = "Setup for test_get_data_version"
312+ )
304313 result , version = client .get_all_branches (get_data_version = True )
305314 assert version
306315 result , version = client .get_all_documents (
@@ -425,9 +434,9 @@ def test_repeated_object_load(docker_url, test_schema):
425434 client .insert_document (
426435 schema , commit_msg = "I am checking in the schema" , graph_type = "schema"
427436 )
428- [country_id ] = client .insert_document ({ "@type" : "Country" ,
429- "name" : "Romania" ,
430- "perimeter" : []} )
437+ [country_id ] = client .insert_document (
438+ { "@type" : "Country" , "name" : "Romania" , "perimeter" : []}
439+ )
431440 obj = client .get_document (country_id )
432441 schema .import_objects (obj )
433442 obj2 = client .get_document (country_id )
@@ -446,12 +455,15 @@ def test_key_change_raises_exception(docker_url, test_schema):
446455 client .insert_document (
447456 schema , commit_msg = "I am checking in the schema" , graph_type = "schema"
448457 )
449- [country_id ] = client .insert_document ({ "@type" : "Country" ,
450- "name" : "Romania" ,
451- "perimeter" : []} )
458+ [country_id ] = client .insert_document (
459+ { "@type" : "Country" , "name" : "Romania" , "perimeter" : []}
460+ )
452461 obj = client .get_document (country_id )
453462 local_obj = schema .import_objects (obj )
454- with pytest .raises (ValueError , match = r"name has been used to generate the id, hence cannot be changed." ):
463+ with pytest .raises (
464+ ValueError ,
465+ match = r"name has been used to generate the id, hence cannot be changed." ,
466+ ):
455467 local_obj .name = "France"
456468 finally :
457469 client .delete_database (db_name )
0 commit comments