mirror of
https://github.com/aljazceru/CTFd.git
synced 2025-12-18 06:24:23 +01:00
Format all the things (#991)
* Format Javascript and CSS files with `prettier`: `prettier --write 'CTFd/themes/**/*'` * Format Python with `black`: `black CTFd` & `black tests` * Travis now uses xenial instead of trusty.
This commit is contained in:
@@ -7,18 +7,18 @@ def test_ratelimit_on_auth():
|
||||
with app.app_context():
|
||||
register_user(app)
|
||||
with app.test_client() as client:
|
||||
r = client.get('/login')
|
||||
r = client.get("/login")
|
||||
with client.session_transaction() as sess:
|
||||
data = {
|
||||
"name": "user",
|
||||
"password": "wrong_password",
|
||||
"nonce": sess.get('nonce')
|
||||
"nonce": sess.get("nonce"),
|
||||
}
|
||||
for x in range(10):
|
||||
r = client.post('/login', data=data)
|
||||
r = client.post("/login", data=data)
|
||||
assert r.status_code == 200
|
||||
|
||||
for x in range(5):
|
||||
r = client.post('/login', data=data)
|
||||
r = client.post("/login", data=data)
|
||||
assert r.status_code == 429
|
||||
destroy_ctfd(app)
|
||||
|
||||
Reference in New Issue
Block a user