use isolated filesystem for test
This commit is contained in:
parent
65a33aedf0
commit
67cc40b0d3
1 changed files with 15 additions and 14 deletions
|
|
@ -7,20 +7,21 @@ def test_get_rates_reads_input_correctly():
|
|||
|
||||
runner = CliRunner()
|
||||
|
||||
run_result = runner.invoke(
|
||||
get_rates,
|
||||
[
|
||||
"--start-date",
|
||||
"2024-01-01",
|
||||
"--end-date",
|
||||
"2024-01-02",
|
||||
"--currencies",
|
||||
"USD,GBP",
|
||||
"--output",
|
||||
"test_output.csv",
|
||||
"--dry-run",
|
||||
],
|
||||
)
|
||||
with runner.isolated_filesystem():
|
||||
run_result = runner.invoke(
|
||||
get_rates,
|
||||
[
|
||||
"--start-date",
|
||||
"2024-01-01",
|
||||
"--end-date",
|
||||
"2024-01-02",
|
||||
"--currencies",
|
||||
"USD,GBP",
|
||||
"--output",
|
||||
"test_output.csv",
|
||||
"--dry-run",
|
||||
],
|
||||
)
|
||||
|
||||
assert run_result.exit_code == 0
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue