Change from "$xx" to "xx USD" to fix tests
This commit is contained in:
parent
61b9683743
commit
7aad059d3d
4 changed files with 19 additions and 21 deletions
|
@ -1,6 +1,6 @@
|
|||
[DEFAULT]
|
||||
date_format = %%Y-%%m-%%d
|
||||
signed_currencies = USD, CAD
|
||||
signed_currencies = CAD
|
||||
signed_currency_format = ¤#,##0.###
|
||||
unsigned_currency_format = #,##0.### ¤¤
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
[DEFAULT]
|
||||
default_date = 2016/04/04
|
||||
loglevel = critical
|
||||
signed_currencies = USD
|
||||
signed_currencies =
|
||||
|
||||
[One]
|
||||
patreon cardfees ledger entry =
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
2017/09/01 Patreon
|
||||
Accrued:Accounts Receivable $-52.47
|
||||
Expenses:Fees:Credit Card $52.47
|
||||
Accrued:Accounts Receivable -52.47 USD
|
||||
Expenses:Fees:Credit Card 52.47 USD
|
||||
|
||||
2017/10/01 Patreon
|
||||
Accrued:Accounts Receivable $-99.47
|
||||
Expenses:Fees:Credit Card $99.47
|
||||
Accrued:Accounts Receivable -99.47 USD
|
||||
Expenses:Fees:Credit Card 99.47 USD
|
||||
|
||||
2017/09/01 Patreon
|
||||
;SourcePath: {source_abspath}
|
||||
;SourceName: {source_name}
|
||||
Accrued:Accounts Receivable $-61.73
|
||||
Expenses:Fundraising $61.73
|
||||
Accrued:Accounts Receivable -61.73 USD
|
||||
Expenses:Fundraising 61.73 USD
|
||||
|
||||
2017/10/01 Patreon
|
||||
;SourcePath: {source_abspath}
|
||||
;SourceName: {source_name}
|
||||
Accrued:Accounts Receivable $-117.03
|
||||
Expenses:Fundraising $117.03
|
||||
Accrued:Accounts Receivable -117.03 USD
|
||||
Expenses:Fundraising 117.03 USD
|
||||
|
|
|
@ -60,7 +60,7 @@ def test_date_formatting():
|
|||
|
||||
def test_currency_formatting():
|
||||
tmpl = template_from('Simplest', signed_currencies=['USD'])
|
||||
assert_easy_render(tmpl, 'CC', '7.99', 'USD', '2015/03/14', '$7.99')
|
||||
assert_easy_render(tmpl, 'CC', '7.99', 'USD', '2015/03/14', 'USD7.99')
|
||||
|
||||
def test_empty_template():
|
||||
tmpl = ledger_entry.Template("\n \n")
|
||||
|
@ -76,19 +76,18 @@ def test_complex_template():
|
|||
lines = render_lines(
|
||||
render_vars, 'Complex',
|
||||
date_fmt='%Y-%m-%d',
|
||||
signed_currencies=['USD'],
|
||||
)
|
||||
assert lines == [
|
||||
"",
|
||||
"2015-03-14 TT",
|
||||
" ;Tag: Value",
|
||||
" ;TransactionID: ABCDEF",
|
||||
" Accrued:Accounts Receivable $125.50",
|
||||
" Accrued:Accounts Receivable 125.50 USD",
|
||||
" ;Entity: Supplier",
|
||||
" Income:Donations:Spectrum Defense $-119.85",
|
||||
" Income:Donations:Spectrum Defense -119.85 USD",
|
||||
" ;Program: Spectrum Defense",
|
||||
" ;Entity: T-T",
|
||||
" Income:Donations:General $-5.65",
|
||||
" Income:Donations:General -5.65 USD",
|
||||
" ;Entity: T-T",
|
||||
]
|
||||
|
||||
|
@ -108,19 +107,18 @@ def test_variable_whitespace_cleaned():
|
|||
lines = render_lines(
|
||||
render_vars, 'Complex',
|
||||
date_fmt='%Y-%m-%d',
|
||||
signed_currencies=['USD'],
|
||||
)
|
||||
assert lines == [
|
||||
"",
|
||||
"2015-03-14 W S",
|
||||
" ;Tag: Value",
|
||||
" ;TransactionID: ABC DEF",
|
||||
" Accrued:Accounts Receivable $125.50",
|
||||
" Accrued:Accounts Receivable 125.50 USD",
|
||||
" ;Entity: Supplier",
|
||||
" Income:Donations:Spectrum Defense $-119.85",
|
||||
" Income:Donations:Spectrum Defense -119.85 USD",
|
||||
" ;Program: Spectrum Defense",
|
||||
" ;Entity: W S",
|
||||
" Income:Donations:General $-5.65",
|
||||
" Income:Donations:General -5.65 USD",
|
||||
" ;Entity: W S",
|
||||
]
|
||||
|
||||
|
@ -342,8 +340,8 @@ def test_hook_renders_template():
|
|||
assert lines == [
|
||||
"",
|
||||
"2015-03-14 BB",
|
||||
" Accrued:Accounts Receivable $0.99",
|
||||
" Income:Donations -$0.99",
|
||||
" Accrued:Accounts Receivable 0.99 USD",
|
||||
" Income:Donations -0.99 USD",
|
||||
]
|
||||
|
||||
def test_hook_handles_empty_template():
|
||||
|
|
Loading…
Add table
Reference in a new issue