Skip to content

Commit

Permalink
adding another test for inspections metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Huff committed Aug 10, 2023
1 parent 1745394 commit c24cd80
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/integration/test_groundlight.py
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,18 @@ def test_update_inspection_metadata_success(gl: Groundlight):
user_provided_value = "1234"
gl.update_inspection_metadata(inspection_id, user_provided_key, user_provided_value)

def test_update_inspection_metadata_failure(gl: Groundlight):
"""Attempts to add metadata to an inspection after it is closed.
Should raise an exception.
"""
inspection_id = gl.start_inspection()

_ = gl.stop_inspection(inspection_id)

with pytest.raises(InternalApiError):
user_provided_key = "Inspector"
user_provided_value = "Bob"
gl.update_inspection_metadata(inspection_id, user_provided_key, user_provided_value)

def test_update_inspection_metadata_invalid_inspection_id(gl: Groundlight):
"""Attempt to update metadata for an inspection that doesn't exist.
Expand Down

0 comments on commit c24cd80

Please sign in to comment.