Skip to content
Snippets Groups Projects
Commit d5f6826a authored by florian's avatar florian
Browse files

STY: autopep'd

parent c3c074af
No related branches found
No related tags found
No related merge requests found
...@@ -135,7 +135,7 @@ class ResourceNotFoundException(CaosDBException): ...@@ -135,7 +135,7 @@ class ResourceNotFoundException(CaosDBException):
CaosDBException.__init__(self, msg=msg) CaosDBException.__init__(self, msg=msg)
######################### Transaction errors ######################### # ######################### Transaction errors #########################
class TransactionError(CaosDBException): class TransactionError(CaosDBException):
......
...@@ -242,13 +242,13 @@ def test_parent_and_properties_errors(): ...@@ -242,13 +242,13 @@ def test_parent_and_properties_errors():
if err.get_code() == parent_code: if err.get_code() == parent_code:
found_parent = True found_parent = True
assert err.errors[0].entity.name == parent.name assert err.errors[0].entity.name == parent.name
assert not prop1.name in [x.name for x in assert prop1.name not in [x.name for x in
err.all_entities] err.all_entities]
assert not prop2.name in [x.name for x in assert prop2.name not in [x.name for x in
err.all_entities] err.all_entities]
elif err.get_code() == prop_code: elif err.get_code() == prop_code:
found_prop = True found_prop = True
assert not parent.name in [x.name for x in assert parent.name not in [x.name for x in
err.all_entities] err.all_entities]
for sub_err in err.errors: for sub_err in err.errors:
if sub_err.get_code() == entity_code: if sub_err.get_code() == entity_code:
...@@ -303,7 +303,7 @@ def test_container_with_faulty_elements(): ...@@ -303,7 +303,7 @@ def test_container_with_faulty_elements():
assert te.get_code() == container_code assert te.get_code() == container_code
# no healthy entity caused an error # no healthy entity caused an error
for good in [good_rec, good_prop]: for good in [good_rec, good_prop]:
assert not good in te.all_entities assert good not in te.all_entities
# all records that caused problems # all records that caused problems
assert {rec_name, rec_auth, rec_par_prop}.issubset(te.all_entities) assert {rec_name, rec_auth, rec_par_prop}.issubset(te.all_entities)
# the container error contains the errors caused by the records # the container error contains the errors caused by the records
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment