Skip to content
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
6 changes: 2 additions & 4 deletions tests/load/sources/rest_api/test_rest_api_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
destinations_configs,
DestinationTestConfiguration,
)
from tests.sources.rest_api.utils import POKEMON_EXPECTED_TABLE_COUNTS


def _make_pipeline(destination_name: str):
Expand Down Expand Up @@ -54,10 +55,7 @@ def test_rest_api_source(destination_config: DestinationTestConfiguration) -> No
table_counts = load_table_counts(pipeline)

assert table_counts.keys() == {"pokemon_list", "berry", "location"}

assert table_counts["pokemon_list"] == 1302
assert table_counts["berry"] == 64
assert table_counts["location"] == 1070
assert table_counts.items() >= POKEMON_EXPECTED_TABLE_COUNTS.items()


@pytest.mark.parametrize(
Expand Down
6 changes: 2 additions & 4 deletions tests/sources/rest_api/test_rest_api_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from dlt.sources.rest_api import rest_api_source, rest_api

from tests.common.configuration.utils import environment, toml_providers
from tests.sources.rest_api.utils import POKEMON_EXPECTED_TABLE_COUNTS
from tests.utils import ALL_DESTINATIONS
from tests.pipeline.utils import assert_load_info, load_table_counts, load_tables_to_dicts

Expand Down Expand Up @@ -78,10 +79,7 @@ def test_rest_api_source(destination_name: str, invocation_type: str) -> None:
table_counts = load_table_counts(pipeline)

assert table_counts.keys() == {"pokemon_list", "berry", "location"}

assert table_counts["pokemon_list"] == 1302
assert table_counts["berry"] == 64
assert table_counts["location"] == 1070
assert table_counts.items() >= POKEMON_EXPECTED_TABLE_COUNTS.items()


@pytest.mark.parametrize("destination_name", ALL_DESTINATIONS)
Expand Down
5 changes: 5 additions & 0 deletions tests/sources/rest_api/utils.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
POKEMON_EXPECTED_TABLE_COUNTS = {
"pokemon_list": 1328,
"berry": 64,
"location": 1070,
}
Loading