Skip to content
Snippets Groups Projects
Commit b35d9ce9 authored by Florian Spreckelsen's avatar Florian Spreckelsen
Browse files

TST: Finsh sketch of unittests

parent c35eb3af
No related branches found
No related tags found
No related merge requests found
......@@ -251,8 +251,19 @@ def test_container_with_faulty_elements():
assert isinstance(ce, ContainerError)
# no healthy entity caused an error
for good in [good_rec, good_prop]:
assert not good in te.all_errors
assert not good 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
for err in ce.errors:
if err.entity.name == rec_name.name:
assert isinstance(err, UniqueNamesError)
elif err.entity.name == rec_auth.name:
assert isinstance(err, AuthorizationException)
elif err.entity.name == rec_par_prop.name:
# record raises both of them
assert (isinstance(err, UnqualifiedParentsError) or
isinstance(err, UnqualifiedPropertiesError))
def test_convenience_functions():
......
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