From 9699f4e527666238b665a3a4aa85329a7086f7cf Mon Sep 17 00:00:00 2001 From: Brett Smith Date: Thu, 25 Jun 2020 13:52:37 -0400 Subject: [PATCH] income_type: Set a default for TrademarkSales. RT#8869. --- conservancy_beancount/plugin/meta_income_type.py | 1 + tests/test_meta_income_type.py | 1 + 2 files changed, 2 insertions(+) diff --git a/conservancy_beancount/plugin/meta_income_type.py b/conservancy_beancount/plugin/meta_income_type.py index 3834347..1272923 100644 --- a/conservancy_beancount/plugin/meta_income_type.py +++ b/conservancy_beancount/plugin/meta_income_type.py @@ -40,6 +40,7 @@ class MetaIncomeType(core._NormalizePostingMetadataHook): 'Income:Sales': 'RBI', 'Income:SoftwareDevelopment': 'RBI', 'Income:TrademarkLicensing': 'RBI', + 'Income:TrademarkSales': 'RBI', } def _run_on_post(self, txn: Transaction, post: data.Posting) -> bool: diff --git a/tests/test_meta_income_type.py b/tests/test_meta_income_type.py index 41bde2a..bae72dd 100644 --- a/tests/test_meta_income_type.py +++ b/tests/test_meta_income_type.py @@ -111,6 +111,7 @@ def test_non_income_accounts_skipped(hook, account): ('Income:Sales', 'RBI'), ('Income:SoftwareDevelopment', 'RBI'), ('Income:TrademarkLicensing', 'RBI'), + ('Income:TrademarkSales', 'RBI'), ]) def test_default_values(hook, account, set_value): txn = testutil.Transaction(postings=[