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):
CaosDBException.__init__(self, msg=msg)
######################### Transaction errors #########################
# ######################### Transaction errors #########################
class TransactionError(CaosDBException):
......@@ -246,7 +246,7 @@ class TransactionError(CaosDBException):
def get_container(self):
"""Return the Container object that contained the problematic
entities.
entities.
Returns
-------
......
......@@ -242,13 +242,13 @@ def test_parent_and_properties_errors():
if err.get_code() == parent_code:
found_parent = True
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]
assert not prop2.name in [x.name for x in
assert prop2.name not in [x.name for x in
err.all_entities]
elif err.get_code() == prop_code:
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]
for sub_err in err.errors:
if sub_err.get_code() == entity_code:
......@@ -303,7 +303,7 @@ def test_container_with_faulty_elements():
assert te.get_code() == container_code
# no healthy entity caused an error
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
assert {rec_name, rec_auth, rec_par_prop}.issubset(te.all_entities)
# 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.
Finish editing this message first!
Please register or to comment