Skip to content
Snippets Groups Projects
Commit b1abad04 authored by florian's avatar florian
Browse files

STY: autopep'd

parent 6a30a586
Branches
Tags
No related merge requests found
......@@ -247,7 +247,7 @@ def test_bad_implementation_wrong_class():
assert exc_info.value.args[0].startswith(
"Bad CaosDBServerConnection implementation.")
assert ("The `implementation` callable did not return an instance of "
"CaosDBServerConnection.") in exc_info.value.args[0]
"CaosDBServerConnection.") in exc_info.value.args[0]
def test_missing_auth_method():
......@@ -262,7 +262,8 @@ def test_missing_password():
connection.configure(implementation=setup_two_resources,
password_method="plain")
connection._authenticator.auth_token = "[test-auth-token]"
assert connection.retrieve(["some"]).headers["Cookie"] == "SessionToken=%5Btest-auth-token%5D;"
assert connection.retrieve(
["some"]).headers["Cookie"] == "SessionToken=%5Btest-auth-token%5D;"
connection.configure(implementation=setup_two_resources,
password_method="plain")
......@@ -274,11 +275,13 @@ def test_auth_token_connection():
connection = configure_connection(auth_token="blablabla",
password_method="auth_token",
implementation=setup_two_resources)
connection.retrieve(["some"]).headers["Cookie"] == "SessionToken=blablabla;"
connection.retrieve(
["some"]).headers["Cookie"] == "SessionToken=blablabla;"
connection._logout()
with raises(LoginFailedException) as cm:
connection.retrieve(["some"]).headers["Cookie"] == "SessionToken=blablabla;"
connection.retrieve(
["some"]).headers["Cookie"] == "SessionToken=blablabla;"
assert cm.value.args[0] == ("The authentication token is expired or you "
"have been logged out otherwise. The "
"auth_token authenticator cannot log in "
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment