diff --git a/validate/dcatus/tests/__init__.py b/validate/tests/dcatus/__init__.py similarity index 100% rename from validate/dcatus/tests/__init__.py rename to validate/tests/dcatus/__init__.py diff --git a/validate/dcatus/tests/conftest.py b/validate/tests/dcatus/conftest.py similarity index 98% rename from validate/dcatus/tests/conftest.py rename to validate/tests/dcatus/conftest.py index 20424591..287d897e 100644 --- a/validate/dcatus/tests/conftest.py +++ b/validate/tests/dcatus/conftest.py @@ -10,130 +10,102 @@ @pytest.fixture def open_dataset_schema(): - dataset_schema = SCHEMA_DIR / "dataset.json" return open_json(dataset_schema) @pytest.fixture def open_catalog_schema(): - catalog_schema = SCHEMA_DIR / "catalog.json" return open_json(catalog_schema) -# invalid - +# invalid @pytest.fixture def open_numerical_title_json(): - json_file = JSON_DIR / "numerical-title.data.json" return open_json(json_file) -# valid - +# valid @pytest.fixture def open_collection_1_parent_2_children_json(): - json_file = JSON_DIR / "collection-1-parent-2-children.data.json" return open_json(json_file) -# invalid - +# invalid @pytest.fixture def open_missing_catalog_json(): - json_file = JSON_DIR / "missing-catalog.data.json" return open_json(json_file) -# invalid - +# invalid @pytest.fixture def open_ny_json(): - json_file = JSON_DIR / "ny.data.json" return open_json(json_file) -# invalid - +# invalid @pytest.fixture def open_missing_identifier_title_json(): - json_file = JSON_DIR / "missing-identifier-title.data.json" return open_json(json_file) -# invalid - +# invalid @pytest.fixture def open_missing_dataset_fields_json(): - json_file = JSON_DIR / "missing-dataset-fields.data.json" return open_json(json_file) -# valid - +# valid @pytest.fixture def open_usda_gov_json(): - json_file = JSON_DIR / "usda.gov.data.json" return open_json(json_file) -# valid - +# valid @pytest.fixture def open_arm_json(): - json_file = JSON_DIR / "arm.data.json" return open_json(json_file) -# valid - +# valid @pytest.fixture def open_large_spatial_json(): - json_file = JSON_DIR / "large-spatial.data.json" return open_json(json_file) -# valid - +# valid @pytest.fixture def open_reserved_title_json(): - json_file = JSON_DIR / "reserved-title.data.json" return open_json(json_file) -# valid - +# valid @pytest.fixture def open_collection_2_parent_4_children_json(): - json_file = JSON_DIR / "collection-2-parent-4-children.data.json" return open_json(json_file) -# valid - +# valid @pytest.fixture def open_geospatial_json(): - json_file = JSON_DIR / "geospatial.data.json" return open_json(json_file) -# valid - +# valid @pytest.fixture def open_null_spatial_json(): - json_file = JSON_DIR / "null-spatial.data.json" return open_json(json_file) diff --git a/validate/dcatus/tests/test_dcat_us.py b/validate/tests/dcatus/test_dcat_us.py similarity index 93% rename from validate/dcatus/tests/test_dcat_us.py rename to validate/tests/dcatus/test_dcat_us.py index b60a199a..b926ad3e 100644 --- a/validate/dcatus/tests/test_dcat_us.py +++ b/validate/tests/dcatus/test_dcat_us.py @@ -2,7 +2,6 @@ def test_numerical_title(open_catalog_schema, open_numerical_title_json): - dataset_schema = open_catalog_schema json_data = open_numerical_title_json @@ -15,8 +14,9 @@ def test_numerical_title(open_catalog_schema, open_numerical_title_json): assert True -def test_collection_1_parent_2_children(open_catalog_schema, open_collection_1_parent_2_children_json): - +def test_collection_1_parent_2_children( + open_catalog_schema, open_collection_1_parent_2_children_json +): dataset_schema = open_catalog_schema json_data = open_collection_1_parent_2_children_json @@ -30,7 +30,6 @@ def test_collection_1_parent_2_children(open_catalog_schema, open_collection_1_p def test_missing_catalog(open_catalog_schema, open_missing_catalog_json): - dataset_schema = open_catalog_schema json_data = open_missing_catalog_json @@ -44,7 +43,6 @@ def test_missing_catalog(open_catalog_schema, open_missing_catalog_json): def test_ny(open_catalog_schema, open_ny_json): - dataset_schema = open_catalog_schema json_data = open_ny_json @@ -57,8 +55,9 @@ def test_ny(open_catalog_schema, open_ny_json): assert True -def test_missing_identifier_title(open_catalog_schema, open_missing_identifier_title_json): - +def test_missing_identifier_title( + open_catalog_schema, open_missing_identifier_title_json +): dataset_schema = open_catalog_schema json_data = open_missing_identifier_title_json @@ -72,7 +71,6 @@ def test_missing_identifier_title(open_catalog_schema, open_missing_identifier_t def test_usda_gov(open_catalog_schema, open_usda_gov_json): - dataset_schema = open_catalog_schema json_data = open_usda_gov_json @@ -86,7 +84,6 @@ def test_usda_gov(open_catalog_schema, open_usda_gov_json): def test_arm(open_catalog_schema, open_arm_json): - dataset_schema = open_catalog_schema json_data = open_arm_json @@ -100,7 +97,6 @@ def test_arm(open_catalog_schema, open_arm_json): def test_large_spatial(open_catalog_schema, open_large_spatial_json): - dataset_schema = open_catalog_schema json_data = open_large_spatial_json @@ -114,7 +110,6 @@ def test_large_spatial(open_catalog_schema, open_large_spatial_json): def test_reserved_title(open_catalog_schema, open_reserved_title_json): - dataset_schema = open_catalog_schema json_data = open_reserved_title_json @@ -127,8 +122,9 @@ def test_reserved_title(open_catalog_schema, open_reserved_title_json): assert False -def test_collection_2_parent_4_children(open_catalog_schema, open_collection_2_parent_4_children_json): - +def test_collection_2_parent_4_children( + open_catalog_schema, open_collection_2_parent_4_children_json +): dataset_schema = open_catalog_schema json_data = open_collection_2_parent_4_children_json @@ -142,7 +138,6 @@ def test_collection_2_parent_4_children(open_catalog_schema, open_collection_2_p def test_geospatial(open_catalog_schema, open_geospatial_json): - dataset_schema = open_catalog_schema json_data = open_geospatial_json @@ -156,7 +151,6 @@ def test_geospatial(open_catalog_schema, open_geospatial_json): def test_null_spatial(open_catalog_schema, open_null_spatial_json): - dataset_schema = open_catalog_schema json_data = open_null_spatial_json