Skip to content

Commit

Permalink
fix boolean comparison for ruff.
Browse files Browse the repository at this point in the history
  • Loading branch information
rshewitt committed Apr 25, 2023
1 parent 218ff9e commit b437cf1
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions tests/validate/dcatus/test_dcat_us.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ def test_numerical_title(open_catalog_schema, open_numerical_title_json):
json_data = open_numerical_title_json

result = validate_json_schema(json_data, dataset_schema)
assert result[0] == False
assert result[0] is False


def test_collection_1_parent_2_children(
Expand All @@ -16,23 +16,23 @@ def test_collection_1_parent_2_children(
json_data = open_collection_1_parent_2_children_json

result = validate_json_schema(json_data, dataset_schema)
assert result[0] == True
assert result[0] is True


def test_missing_catalog(open_catalog_schema, open_missing_catalog_json):
dataset_schema = open_catalog_schema
json_data = open_missing_catalog_json

result = validate_json_schema(json_data, dataset_schema)
assert result[0] == False
assert result[0] is False


def test_ny(open_catalog_schema, open_ny_json):
dataset_schema = open_catalog_schema
json_data = open_ny_json

result = validate_json_schema(json_data, dataset_schema)
assert result[0] == False
assert result[0] is False


def test_missing_identifier_title(
Expand All @@ -42,39 +42,39 @@ def test_missing_identifier_title(
json_data = open_missing_identifier_title_json

result = validate_json_schema(json_data, dataset_schema)
assert result[0] == False
assert result[0] is False


def test_usda_gov(open_catalog_schema, open_usda_gov_json):
dataset_schema = open_catalog_schema
json_data = open_usda_gov_json

result = validate_json_schema(json_data, dataset_schema)
assert result[0] == True
assert result[0] is True


def test_arm(open_catalog_schema, open_arm_json):
dataset_schema = open_catalog_schema
json_data = open_arm_json

result = validate_json_schema(json_data, dataset_schema)
assert result[0] == True
assert result[0] is True


def test_large_spatial(open_catalog_schema, open_large_spatial_json):
dataset_schema = open_catalog_schema
json_data = open_large_spatial_json

result = validate_json_schema(json_data, dataset_schema)
assert result[0] == True
assert result[0] is True


def test_reserved_title(open_catalog_schema, open_reserved_title_json):
dataset_schema = open_catalog_schema
json_data = open_reserved_title_json

result = validate_json_schema(json_data, dataset_schema)
assert result[0] == True
assert result[0] is True


def test_collection_2_parent_4_children(
Expand All @@ -84,20 +84,20 @@ def test_collection_2_parent_4_children(
json_data = open_collection_2_parent_4_children_json

result = validate_json_schema(json_data, dataset_schema)
assert result[0] == True
assert result[0] is True


def test_geospatial(open_catalog_schema, open_geospatial_json):
dataset_schema = open_catalog_schema
json_data = open_geospatial_json

result = validate_json_schema(json_data, dataset_schema)
assert result[0] == True
assert result[0] is True


def test_null_spatial(open_catalog_schema, open_null_spatial_json):
dataset_schema = open_catalog_schema
json_data = open_null_spatial_json

result = validate_json_schema(json_data, dataset_schema)
assert result[0] == True
assert result[0] is True

1 comment on commit b437cf1

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage

Coverage Report
FileStmtsMissCover
datagovharvester/utils
   __init__.py00100%
   json_utilities.py40100%
datagovharvester/validate
   __init__.py00100%
   dcat_us.py120100%
TOTAL160100%

Tests Skipped Failures Errors Time
12 0 💤 0 ❌ 0 🔥 13.304s ⏱️

Please sign in to comment.