@@ -155,14 +155,14 @@ def test_missing_project_data(repo_path):
def test_invalid_project_data(repo_path_s, data_path_s):
config = testutil.TestConfig(repo_path=repo_path_s)
with pytest.raises(errormod.ConfigurationError):
meta_project.MetaProject(config, Path(data_path_s))
def test_not_required_on_opening(hook):
txn = testutil.Transaction.opening_balance('Equity:Funds:Unrestricted')
txn = testutil.OpeningBalance('Equity:Funds:Unrestricted')
assert not list(hook.run(txn))
def test_always_required_on_restricted_funds(hook):
acct = 'Equity:Funds:Restricted'
txn = testutil.Transaction.opening_balance(acct)
txn = testutil.OpeningBalance(acct)
actual = {error.message for error in hook.run(txn)}
assert actual == {f'{acct} missing project'}