Commit fed8c2e2 authored by Bruno Duyé's avatar Bruno Duyé
Browse files

#660 - add test

parent aec3a69d
Pipeline #229036 passed with stage
in 42 seconds
......@@ -47,7 +47,7 @@ interactions:
Content-Type:
- application/json
Date:
- Wed, 31 Mar 2021 15:06:21 GMT
- Wed, 31 Mar 2021 15:24:46 GMT
Server:
- nginx/1.14.2
status:
......
......@@ -288,3 +288,14 @@ def test_fetch_series_without_dimensions_labels_nor_dimensions_values_labels():
# dimensions_labels column shouldn't exist
assert not 'Data Type' in list(df.columns)
@pytest.mark.vcr(decode_compressed_response=True)
def test_fetch_series_that_dont_use_all_defined_dimensions_in_dataset():
"""https://git.nomics.world/dbnomics-fetchers/management/-/issues/660"""
# Thanks to @pytest.mark.vcr decorator, this request result will be read from cassettes yaml file (the one that match the test function name)
df = fetch_series('BEA/NIPA-T11706/A191RX-Q')
# Check that all expected columns are present
expected_columns = {'@frequency', 'provider_code', 'dataset_code', 'dataset_name', 'series_code', 'series_name', 'original_period', 'period', 'original_value', 'value', 'concept', 'FREQ', 'metric', 'unit', 'Concept', 'Frequency', 'Metric', 'Unit'}
assert expected_columns & set(df.columns) == expected_columns, set(df.columns)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment