Use black for formatting

This commit is contained in:
richard-dds
2018-06-26 10:31:39 -04:00
parent 3599440ee6
commit f9335c7a4e
28 changed files with 362 additions and 255 deletions

View File

@@ -9,10 +9,10 @@ def test_redirects_when_not_logged_in(http_client, base_url):
response = yield http_client.fetch(
base_url + "/home", raise_error=False, follow_redirects=False
)
location = response.headers['Location']
location = response.headers["Location"]
assert response.code == 302
assert response.error
assert re.match('/\??', location)
assert re.match("/\??", location)
@pytest.mark.gen_test
@@ -22,16 +22,15 @@ def test_login_with_valid_bearer_token(app, monkeypatch, http_client, base_url):
return True
monkeypatch.setattr(
"atst.handlers.login.Login._validate_login_token",
_validate_login_token
"atst.handlers.login.Login._validate_login_token", _validate_login_token
)
response = yield http_client.fetch(
base_url + "/login?bearer-token=abc-123",
follow_redirects=False,
raise_error=False
raise_error=False,
)
assert response.headers["Set-Cookie"].startswith("atst")
assert response.headers['Location'] == '/home'
assert response.headers["Location"] == "/home"
assert response.code == 302