Skip to content

Commit

Permalink
include test for table object
Browse files Browse the repository at this point in the history
  • Loading branch information
adnejacobsen committed Sep 7, 2023
1 parent caa7854 commit df05aca
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/test_schema/test_schema_logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,17 @@ def test_schema_logic_data_spec(schema_080, metadata_examples):
with pytest.raises(jsonschema.exceptions.ValidationError):
jsonschema.validate(instance=example_surface, schema=schema_080)

# fetch table example
example_table = deepcopy(metadata_examples["table_inplace.yml"])

# assert validation with no changes
jsonschema.validate(instance=example_table, schema=schema_080)

# assert data.spec required when class == table
del example_table["data"]["spec"]
with pytest.raises(jsonschema.exceptions.ValidationError):
jsonschema.validate(instance=example_table, schema=schema_080)

# fetch dictionary example
example_dict = deepcopy(metadata_examples["dictionary_parameters.yml"])

Expand Down

0 comments on commit df05aca

Please sign in to comment.