Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update tests #4

Merged
merged 2 commits into from
Apr 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions tests/test_historical_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import pytest


@pytest.mark.parametrize("symbol", [["^AEX"], ["^AEX", "^DAX"]])
@pytest.mark.parametrize("symbol", [["RDSA.AS"], ["RDSA.AS", "UNA.AS"]])
def test_historical_data(symbol, wtdpy):
"""Test historical data request without additional data."""

Expand All @@ -17,7 +17,7 @@ def test_historical_data(symbol, wtdpy):
assert key == symbol[ix]


@pytest.mark.parametrize("symbol", [["^AEX"], ["^AEX", "^DAX"]])
@pytest.mark.parametrize("symbol", [["RDSA.AS"], ["RDSA.AS", "UNA.AS"]])
def test_historical_data_date_from(symbol, wtdpy):
"""Test historical data request with a timewindow."""

Expand All @@ -42,7 +42,7 @@ def test_historical_data_date_from(symbol, wtdpy):
response = wtdpy.get_historical_data(symbol, date_from=date_from)


@pytest.mark.parametrize("symbol", [["^AEX"], ["^AEX", "^DAX"]])
@pytest.mark.parametrize("symbol", [["RDSA.AS"], ["RDSA.AS", "UNA.AS"]])
def test_historical_data_date_to(symbol, wtdpy):
"""Test historical data request with a timewindow."""

Expand All @@ -67,7 +67,7 @@ def test_historical_data_date_to(symbol, wtdpy):
response = wtdpy.get_historical_data(symbol, date_to=date_to)


@pytest.mark.parametrize("symbol", [["^AEX"], ["^AEX", "^DAX"]])
@pytest.mark.parametrize("symbol", [["RDSA.AS"], ["RDSA.AS", "UNA.AS"]])
def test_historical_data_sort(symbol, wtdpy):
"""Test historical data request with a sort parameter."""

Expand All @@ -88,7 +88,7 @@ def test_historical_data_sort(symbol, wtdpy):
)


@pytest.mark.parametrize("symbol", [["^AEX"], ["^AEX", "^DAX"]])
@pytest.mark.parametrize("symbol", [["RDSA.AS"], ["RDSA.AS", "UNA.AS"]])
def test_historical_data_output(symbol, wtdpy):
"""Test historical data request with an output parameter."""

Expand Down
10 changes: 7 additions & 3 deletions tests/test_search_symbols.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,17 @@
import pytest


@pytest.mark.parametrize("symbol", [["^AEX"], ["^AEX", "^DAX"]])
@pytest.mark.parametrize("symbol", [["RDSA.AS"], ["RDSA.AS", "UNA.AS"]])
def test_search_symbols(symbol, wtdpy):
"""Test search request without additional data."""

# Symbols are correct so should return `True`
assert wtdpy.search_available_data(symbol)


@pytest.mark.parametrize("symbol", [["AEX"], ["AEX", "DAX"]])
@pytest.mark.parametrize(
"symbol", [["Royal Dutch Shell"], ["Royal Dutch Shell", "Unilever"]]
)
def test_search_symbols_list_alternative(symbol, wtdpy):
"""Test search request without additional data."""

Expand All @@ -20,7 +22,9 @@ def test_search_symbols_list_alternative(symbol, wtdpy):
assert len(symbol) == len(response)


@pytest.mark.parametrize("symbol", [["AEX"], ["AEX", "DAX"]])
@pytest.mark.parametrize(
"symbol", [["Royal Dutch Shell"], ["Royal Dutch Shell", "Unilever"]]
)
def test_search_symbols_list_alternatives(symbol, wtdpy):
"""Test search request without additional data."""

Expand Down