From c1058c7438f1a9cb568f77bca9d7b2ff8d31313e Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Sat, 26 Sep 2020 18:17:53 +0200 Subject: [PATCH] e2e: fix formatting --- e2e/test_source_oauth.py | 12 ++++++++---- passbook/sources/oauth/clients/oauth1.py | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/e2e/test_source_oauth.py b/e2e/test_source_oauth.py index 37754220c..6951f97bc 100644 --- a/e2e/test_source_oauth.py +++ b/e2e/test_source_oauth.py @@ -16,7 +16,10 @@ from yaml import safe_dump from e2e.utils import SeleniumTestCase from passbook.flows.models import Flow -from passbook.providers.oauth2.generators import generate_client_id, generate_client_secret +from passbook.providers.oauth2.generators import ( + generate_client_id, + generate_client_secret, +) from passbook.sources.oauth.models import OAuthSource TOKEN_URL = "http://127.0.0.1:5556/dex/token" @@ -244,7 +247,6 @@ class TestSourceOAuth2(SeleniumTestCase): @skipUnless(platform.startswith("linux"), "requires local docker") class TestSourceOAuth1(SeleniumTestCase): - def setUp(self) -> None: self.client_id = generate_client_id() self.client_secret = generate_client_secret() @@ -324,10 +326,12 @@ class TestSourceOAuth1(SeleniumTestCase): "example-user", ) self.assertEqual( - self.driver.find_element(By.ID, "id_username").get_attribute("value"), "example-user" + self.driver.find_element(By.ID, "id_username").get_attribute("value"), + "example-user", ) self.assertEqual( - self.driver.find_element(By.ID, "id_name").get_attribute("value"), "test name", + self.driver.find_element(By.ID, "id_name").get_attribute("value"), + "test name", ) self.assertEqual( self.driver.find_element(By.ID, "id_email").get_attribute("value"), diff --git a/passbook/sources/oauth/clients/oauth1.py b/passbook/sources/oauth/clients/oauth1.py index 6965d514e..783efb87d 100644 --- a/passbook/sources/oauth/clients/oauth1.py +++ b/passbook/sources/oauth/clients/oauth1.py @@ -34,7 +34,7 @@ class OAuthClient(BaseOAuthClient): token=token, headers=self._default_headers, oauth_verifier=verifier, - oauth_callback=callback + oauth_callback=callback, ) response.raise_for_status() except RequestException as exc: