e2e: fix formatting

This commit is contained in:
Jens Langhammer 2020-09-26 18:17:53 +02:00
parent c37901feb9
commit c1058c7438
2 changed files with 9 additions and 5 deletions

View File

@ -16,7 +16,10 @@ from yaml import safe_dump
from e2e.utils import SeleniumTestCase from e2e.utils import SeleniumTestCase
from passbook.flows.models import Flow 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 from passbook.sources.oauth.models import OAuthSource
TOKEN_URL = "http://127.0.0.1:5556/dex/token" TOKEN_URL = "http://127.0.0.1:5556/dex/token"
@ -244,7 +247,6 @@ class TestSourceOAuth2(SeleniumTestCase):
@skipUnless(platform.startswith("linux"), "requires local docker") @skipUnless(platform.startswith("linux"), "requires local docker")
class TestSourceOAuth1(SeleniumTestCase): class TestSourceOAuth1(SeleniumTestCase):
def setUp(self) -> None: def setUp(self) -> None:
self.client_id = generate_client_id() self.client_id = generate_client_id()
self.client_secret = generate_client_secret() self.client_secret = generate_client_secret()
@ -324,10 +326,12 @@ class TestSourceOAuth1(SeleniumTestCase):
"example-user", "example-user",
) )
self.assertEqual( 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.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.assertEqual(
self.driver.find_element(By.ID, "id_email").get_attribute("value"), self.driver.find_element(By.ID, "id_email").get_attribute("value"),

View File

@ -34,7 +34,7 @@ class OAuthClient(BaseOAuthClient):
token=token, token=token,
headers=self._default_headers, headers=self._default_headers,
oauth_verifier=verifier, oauth_verifier=verifier,
oauth_callback=callback oauth_callback=callback,
) )
response.raise_for_status() response.raise_for_status()
except RequestException as exc: except RequestException as exc: