Skip to content

Commit

Permalink
Fix testing with csrf token
Browse files Browse the repository at this point in the history
  • Loading branch information
jdabtieu committed Dec 18, 2023
1 parent f5af4da commit 3fb4d8b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/tests/test_contest.py
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ def test_contest_rejudge(client, database):
result = client.get('/contest/testingcontest/scoreboard')
assert result.status_code == 200
assert b'None' not in result.data
assert result.data.replace(b'501', b'1') == result2.data # Check points and last AC
assert result.data[result.data.index(b'table'):].replace(b'501', b'1') == result2.data[result2.data.index(b'table'):] # Check points and last AC


result = client.post('/contest/testingcontest/problem/static/edit', data={
Expand All @@ -491,7 +491,7 @@ def test_contest_rejudge(client, database):
result = client.get('/contest/testingcontest/scoreboard')
assert result.status_code == 200
assert b'None' not in result.data
assert result.data == result1.data # Check points and last AC
assert result.data[result.data.index(b'table'):] == result1.data[result1.data.index(b'table'):] # Check points and last AC

client.post('/contest/testingcontest/delete', follow_redirects=True)
assert result.status_code == 200
assert result.status_code == 200

0 comments on commit 3fb4d8b

Please sign in to comment.