Skip to content

Commit

Permalink
fix: failing unit tests because of emit_filing_account change
Browse files Browse the repository at this point in the history
- emit_filing_account was turned on by default in 07d972d, which broke
  unit tests
  • Loading branch information
redstreet committed Nov 17, 2024
1 parent 3cab851 commit 9daa22b
Show file tree
Hide file tree
Showing 12 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions beancount_reds_importers/importers/ally/tests/ally_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
{
"account_number": "23456",
"main_account": "Assets:Banks:Checking",
"emit_filing_account_metadata": False,
}
)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
{
"account_number": "9876",
"main_account": "Assets:Banks:CapitalOne",
"emit_filing_account_metadata": False,
}
)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
{
"main_account": "Assets:Banks:DCU:Checking",
"currency": "USD",
"emit_filing_account_metadata": False,
}
)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ def build_config():
"rounding_error": "Equity:Rounding-Errors:Imports",
"fund_info": fund_info,
"currency": currency,
"emit_filing_account_metadata": False,
}
return config

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ def build_config():
"rounding_error": "Equity:Rounding-Errors:Imports",
"fund_info": fund_info,
"currency": currency,
"emit_filing_account_metadata": False,
}
return config

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"account_number": "1234",
"main_account": "Assets:Banks:Schwab",
"currency": "USD",
"emit_filing_account_metadata": False,
}
)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"account_number": "1234567890",
"currency": "SGD",
"rounding_error": "Equity:Rounding-Errors:Imports",
"emit_filing_account_metadata": False,
}
)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
],
"money_market": ["VMFXX"],
},
"emit_filing_account_metadata": False,
}
)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"account_number": "23456",
"main_account": "Assets:Banks:Checking",
"balance_assertion_date_type": "last_transaction",
"emit_filing_account_metadata": False,
}
)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"account_number": "23456",
"main_account": "Assets:Banks:Checking",
"balance_assertion_date_type": "ofx_date",
"emit_filing_account_metadata": False,
}
)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
{
"account_number": "23456",
"main_account": "Assets:Banks:Checking",
"emit_filing_account_metadata": False,
}
)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def build_metadata(self, file, metatype=None, data={}):
# This 'filing_account' is read by a patch to bean-extract so it can output transactions to
# a file that corresponds with filing_account, when the one-file-per-account feature is
# used.
if not self.config.get("emit_filing_account_metadata", False):
if self.config.get("emit_filing_account_metadata", True) is not False:
acct = self.config.get("filing_account", self.config.get("main_account", None))
return {"filing_account": acct}
return {}

0 comments on commit 9daa22b

Please sign in to comment.