many changes
This commit is contained in:
parent
126ede37a4
commit
661941a65c
7 changed files with 102 additions and 21 deletions
|
|
@ -14,6 +14,7 @@ def test_handle_input_rates_works_with_full_correct_inputs():
|
|||
end_date=datetime.datetime.now() - datetime.timedelta(days=1),
|
||||
currencies="USD,EUR,GBP",
|
||||
dry_run=False,
|
||||
ignore_warnings=True,
|
||||
output="test_output.csv",
|
||||
)
|
||||
expected_result = {
|
||||
|
|
@ -23,6 +24,7 @@ def test_handle_input_rates_works_with_full_correct_inputs():
|
|||
),
|
||||
"currencies": {Currency("USD"), Currency("EUR"), Currency("GBP")},
|
||||
"dry_run": False,
|
||||
"ignore_warnings": True,
|
||||
"output": pathlib.Path("test_output.csv"),
|
||||
}
|
||||
|
||||
|
|
@ -38,6 +40,7 @@ def test_handle_input_rates_raises_with_bad_currency_code():
|
|||
end_date=datetime.datetime.now() + datetime.timedelta(days=7),
|
||||
currencies="not_a_currency,USD,not_this_either",
|
||||
dry_run=False,
|
||||
ignore_warnings=True,
|
||||
output="test_output.csv",
|
||||
)
|
||||
|
||||
|
|
@ -49,6 +52,7 @@ def test_handle_input_rates_raises_with_start_date_after_end_date():
|
|||
end_date=datetime.datetime.now() - datetime.timedelta(days=7),
|
||||
currencies="GBP,USD",
|
||||
dry_run=False,
|
||||
ignore_warnings=True,
|
||||
output="test_output.csv",
|
||||
)
|
||||
|
||||
|
|
@ -60,6 +64,7 @@ def test_handle_input_rates_raises_with_output_different_than_csv():
|
|||
end_date=datetime.datetime.now() + datetime.timedelta(days=7),
|
||||
currencies="GBP,USD",
|
||||
dry_run=False,
|
||||
ignore_warnings=True,
|
||||
output="test_output.xlsx",
|
||||
)
|
||||
|
||||
|
|
@ -70,6 +75,7 @@ def test_handle_input_rates_brings_future_end_date_to_today():
|
|||
end_date=datetime.datetime.now() + datetime.timedelta(days=7),
|
||||
currencies="USD,EUR,GBP",
|
||||
dry_run=False,
|
||||
ignore_warnings=True,
|
||||
output="test_output.csv",
|
||||
)
|
||||
|
||||
|
|
@ -82,6 +88,7 @@ def test_handle_input_rates_start_and_end_date_equal_works_fine():
|
|||
end_date=datetime.datetime.now(),
|
||||
currencies="USD,EUR,GBP",
|
||||
dry_run=False,
|
||||
ignore_warnings=True,
|
||||
output="test_output.csv",
|
||||
)
|
||||
expected_result = {
|
||||
|
|
@ -91,6 +98,7 @@ def test_handle_input_rates_start_and_end_date_equal_works_fine():
|
|||
),
|
||||
"currencies": {Currency("USD"), Currency("EUR"), Currency("GBP")},
|
||||
"dry_run": False,
|
||||
"ignore_warnings": True,
|
||||
"output": pathlib.Path("test_output.csv"),
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue