Skip to content

Commit

Permalink
Add validation for category and project in clips
Browse files Browse the repository at this point in the history
  • Loading branch information
andersy005 committed Jan 18, 2024
1 parent 482d714 commit 78a623e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/test_clips.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ def test_get_clips(test_app):
assert response.status_code == 200
assert isinstance(response.json()['data'], list)

# For each clip, make sure category and project are present and not empty
for clip in response.json()['data']:
assert isinstance(clip['projects'], list)
for project in clip['projects']:
assert project['project_id'] is not None
assert project['category'] is not None


def test_get_filtered_clips(test_app):
response = test_app.get('/clips/?sort=-date&date_from=2024-01-01')
Expand Down

0 comments on commit 78a623e

Please sign in to comment.