diff --git a/tests/test_plugin_HookRegistry.py b/tests/test_plugin_HookRegistry.py index 6d899873a19af00d09e4a776c3a353f18653ff40..6f357e864d105994a939e51c5e088440683681d0 100644 --- a/tests/test_plugin_HookRegistry.py +++ b/tests/test_plugin_HookRegistry.py @@ -25,28 +25,28 @@ def hook_names(hooks, key): def test_default_registrations(): hooks = plugin.HOOK_REGISTRY.group_by_directive() - post_hook_names = hook_names(hooks, 'Posting') - assert len(post_hook_names) >= 2 - assert 'MetaExpenseAllocation' in post_hook_names - assert 'MetaTaxImplication' in post_hook_names + txn_hook_names = hook_names(hooks, 'Transaction') + assert len(txn_hook_names) >= 2 + assert 'MetaExpenseAllocation' in txn_hook_names + assert 'MetaTaxImplication' in txn_hook_names def test_exclude_single(): hooks = plugin.HOOK_REGISTRY.group_by_directive('-expense-allocation') - post_hook_names = hook_names(hooks, 'Posting') - assert post_hook_names - assert 'MetaExpenseAllocation' not in post_hook_names + txn_hook_names = hook_names(hooks, 'Transaction') + assert txn_hook_names + assert 'MetaExpenseAllocation' not in txn_hook_names def test_exclude_group_then_include_single(): hooks = plugin.HOOK_REGISTRY.group_by_directive('-metadata expense-allocation') - post_hook_names = hook_names(hooks, 'Posting') - assert 'MetaExpenseAllocation' in post_hook_names - assert 'MetaTaxImplication' not in post_hook_names + txn_hook_names = hook_names(hooks, 'Transaction') + assert 'MetaExpenseAllocation' in txn_hook_names + assert 'MetaTaxImplication' not in txn_hook_names def test_include_group_then_exclude_single(): hooks = plugin.HOOK_REGISTRY.group_by_directive('metadata -tax-implication') - post_hook_names = hook_names(hooks, 'Posting') - assert 'MetaExpenseAllocation' in post_hook_names - assert 'MetaTaxImplication' not in post_hook_names + txn_hook_names = hook_names(hooks, 'Transaction') + assert 'MetaExpenseAllocation' in txn_hook_names + assert 'MetaTaxImplication' not in txn_hook_names def test_unknown_group_name(): with pytest.raises(ValueError):