Skip to content

Commit

Permalink
refactor: use provider_config live internal variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Romazes committed Apr 19, 2024
1 parent 1393c12 commit 3c9b704
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/commands/data/test_download.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,11 @@ def test_download_data_non_interactive_data_provider_missed_param(data_provider:
@pytest.mark.parametrize("data_provider,wrong_security_type",
[("Polygon", "Future"),("Polygon", "Crypto"),("Polygon", "Forex")])
def test_download_data_non_interactive_wrong_security_type(data_provider: str, wrong_security_type: str):
run_data_download = _create_lean_data_download(data_provider, "Trade", "Hour", wrong_security_type, ["AAPL"], "20240101", "20240202", _get_data_provider_config(), ["--polygon-api-key", "123"])
data_provider_config = {
"data-supported": [ "Equity", "Equity Options", "Indexes", "Index Options" ]
}

run_data_download = _create_lean_data_download(data_provider, "Trade", "Hour", wrong_security_type, ["AAPL"], "20240101", "20240202", data_provider_config, ["--polygon-api-key", "123"])
assert run_data_download.exit_code == 1

error_msg = str(run_data_download.exc_info[1])
Expand Down

0 comments on commit 3c9b704

Please sign in to comment.