Skip to content

Commit

Permalink
Merge pull request #65 from astrodbtoolkit/test_regimes_table
Browse files Browse the repository at this point in the history
Test regimes table
  • Loading branch information
arjunsavel authored Jul 9, 2024
2 parents d12af68 + d452a61 commit 0632fd1
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/test_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,19 @@ def test_instruments_schema(values, error_state):
schema_tester(Instruments, values, error_state)



@pytest.mark.parametrize("values, error_state",
[
({"regime": "good"}, None),
({"regime": "ThisIsASuperLongInstrumentNameThatIsInvalid!!!!!!!"}, ValueError)
])
def test_instruments_schema(values, error_state):
"""
In the schema, there is a validation that makes sure that the length of the regime is less than 30 characters.
"""
schema_tester(Regimes, values, error_state)


# test the ucds. they're passed to phorometry filter and should break things if they're random strings
@pytest.mark.parametrize("values, error_state",
[
Expand Down

0 comments on commit 0632fd1

Please sign in to comment.