Skip to content

Commit

Permalink
[skip ci] autoformat
Browse files Browse the repository at this point in the history
  • Loading branch information
jdabtieu committed Dec 7, 2023
1 parent 42acf79 commit b61e917
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import sqlalchemy
import sys


# https://github.com/cs50/python-cs50/issues/178
if int(sqlalchemy.__version__.split('.')[0]) == 1:
SQL = cs50_SQL
Expand All @@ -20,7 +21,6 @@ def execute(self, query, *args, **kwargs):
raise e



try:
db = SQL("sqlite:///database.db")
except Exception as e: # when testing
Expand Down
3 changes: 1 addition & 2 deletions src/tests/test_instancer.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ def test_instancer(client, database):
endpoint_test(client, 'create', True)
endpoint_test(client, 'destroy', True)


database.execute(
("INSERT INTO 'users' VALUES(2, 'normal_user', 'pbkdf2:sha256:150000$XoLKRd3I$"
"2dbdacb6a37de2168298e419c6c54e768d242aee475aadf1fa9e6c30aa02997f', 'e2', "
Expand All @@ -109,4 +108,4 @@ def test_instancer(client, database):

client.post('/login', data={'username': 'admin', 'password': 'CTFOJadmin'})
result = client.post('/contest/testingcontest/delete', follow_redirects=True)
assert result.status_code == 200
assert result.status_code == 200
2 changes: 1 addition & 1 deletion src/tests/test_register.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,4 +147,4 @@ def test_register(client, database):
assert b'successfully removed' in result.data

result = client.get(f'/cancelregister/{token}', follow_redirects=True)
assert b'invalid' in result.data
assert b'invalid' in result.data

0 comments on commit b61e917

Please sign in to comment.