From 89aaae821b30afe865ab4f0f7a8d265483cb2148 Mon Sep 17 00:00:00 2001 From: Brett Smith Date: Wed, 18 Mar 2020 16:25:37 -0400 Subject: [PATCH] data.Account: Exclude PrepaidVacation from "real" assets. Same rationale as PrepaidExpenses. --- conservancy_beancount/data.py | 1 + tests/test_data_account.py | 1 + 2 files changed, 2 insertions(+) diff --git a/conservancy_beancount/data.py b/conservancy_beancount/data.py index 6475f83..d50bcb8 100644 --- a/conservancy_beancount/data.py +++ b/conservancy_beancount/data.py @@ -39,6 +39,7 @@ class Account(str): return ( self.is_under('Assets:') and not self.is_under('Assets:PrepaidExpenses') + and not self.is_under('Assets:PrepaidVacation') ) def is_under(self, acct_s: str) -> bool: diff --git a/tests/test_data_account.py b/tests/test_data_account.py index 622c499..bfc6f86 100644 --- a/tests/test_data_account.py +++ b/tests/test_data_account.py @@ -37,6 +37,7 @@ def test_is_under(acct_name, under_arg, expected): ('Assets:Cash', True), ('Assets:Cash:EUR', True), ('Assets:PrepaidExpenses', False), + ('Assets:PrepaidVacation', False), ('Assets:Bank:Checking', True), ('Expenses:General', False), ('Income:Donations', False),