diff --git a/unittests/test_connection.py b/unittests/test_connection.py index df61d4c439ade9ae231f6a110eb02ad7f7f5bbd0..c5a375063936ec0fd94f15605763d384cb4b3c4d 100644 --- a/unittests/test_connection.py +++ b/unittests/test_connection.py @@ -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 "