Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
andersy005 committed Sep 21, 2023
1 parent ddc4097 commit e44d608
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions tests/test_projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,18 @@ def test_get_project(test_app):
assert response.status_code == 404
assert response.json() == {'detail': 'project 123 not found'}

response = test_app.get('/projects/VCS162')
response = test_app.get('/projects')
assert response.status_code == 200
data = response.json()['data'][0]
project_id = data['project_id']
registry = data['registry']

response = test_app.get(f'/projects/{project_id}')
assert response.status_code == 200
data = response.json()
assert isinstance(data, dict)
assert data['project_id'] == 'VCS162'
assert data['registry'] == 'verra'
assert data['project_id'] == project_id
assert data['registry'] == registry

assert 'issued' in data
assert 'retired' in data
Expand Down

0 comments on commit e44d608

Please sign in to comment.