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:
Kevin Chung
2019-05-11 21:09:37 -04:00
committed by GitHub
parent 3d23ece370
commit 6833378c36
201 changed files with 9561 additions and 9107 deletions

View File

@@ -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)