Skip to content

Commit

Permalink
Ensure 0e4a5cf cannot happen again
Browse files Browse the repository at this point in the history
  • Loading branch information
jdabtieu committed Nov 19, 2023
1 parent 7718079 commit 4c6b14f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/tests/test_problems.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ def test_problem(client, database):
assert result.status_code == 200
assert b'published' in result.data

result = client.get('/problem/helloworldtesting/editeditorial')
assert result.status_code == 200
result = client.post('/problem/helloworldtesting/editeditorial',
data={'editorial': 'sample editorial'}, follow_redirects=True)
assert result.status_code == 200
Expand Down Expand Up @@ -136,13 +138,13 @@ def test_problem(client, database):
assert b'Congratulations' in result.data

# test if nonexistent problems don't exist
result = client.get('/problem/idontexist', follow_redirects=True)
result = client.get('/problem/idontexist')
assert result.status_code == 404
assert b'does not exist' in result.data
client.get('/logout')

client.post('/login', data={'username': 'admin', 'password': 'CTFOJadmin'})
result = client.get('/problem/helloworldtesting/download', follow_redirects=True)
result = client.get('/problem/helloworldtesting/download')
assert result.status_code == 200

result = client.post('/problem/helloworldtesting/delete', follow_redirects=True)
Expand Down

0 comments on commit 4c6b14f

Please sign in to comment.