test_plugin: Restore negative assert to test_registry_group_by_directive.

This commit is contained in:
Brett Smith 2020-03-19 16:11:29 -04:00
parent 484c47a680
commit e424173216

View file

@ -84,6 +84,8 @@ def test_registry_group_by_directive(group_str, expected):
hook_groups = HOOK_REGISTRY.group_by_directive(*args)
actual = {type(hook) for hook in hook_groups['Transaction']}
assert actual.issuperset(expected)
if len(expected) == 1:
assert not (TransactionError in actual and PostingError in actual)
def test_registry_unknown_group_name():
with pytest.raises(ValueError):