From 8b3770a22628a07395e343df4a79e9645537646e Mon Sep 17 00:00:00 2001 From: Sourcery AI <> Date: Wed, 13 Jul 2022 16:05:07 +0000 Subject: [PATCH] 'Refactored by Sourcery' --- tests/_async/test_client_with_auto_confirm_enabled.py | 7 ++++--- tests/_sync/test_client_with_auto_confirm_enabled.py | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/tests/_async/test_client_with_auto_confirm_enabled.py b/tests/_async/test_client_with_auto_confirm_enabled.py index b1b3eeb4..b82ab552 100644 --- a/tests/_async/test_client_with_auto_confirm_enabled.py +++ b/tests/_async/test_client_with_auto_confirm_enabled.py @@ -338,10 +338,10 @@ async def test_get_update_user_after_sign_out(client: AsyncGoTrueClient): @pytest.mark.depends(on=[test_get_user_after_sign_out.__name__]) async def test_sign_in_with_the_wrong_password(client: AsyncGoTrueClient): try: - await client.sign_in(email=email, password=password + "2") + await client.sign_in(email=email, password=f"{password}2") assert False except APIError: - assert True + pass except Exception as e: assert False, str(e) @@ -420,8 +420,9 @@ async def test_get_session_from_url_errors(client: AsyncGoTrueClient): error_description = fake.email() try: await client.get_session_from_url( - url=dummy_url + f"?error_description={error_description}" + url=f"{dummy_url}?error_description={error_description}" ) + assert False except APIError as e: assert e.code == 400 diff --git a/tests/_sync/test_client_with_auto_confirm_enabled.py b/tests/_sync/test_client_with_auto_confirm_enabled.py index 8848e9c4..ce4ba110 100644 --- a/tests/_sync/test_client_with_auto_confirm_enabled.py +++ b/tests/_sync/test_client_with_auto_confirm_enabled.py @@ -332,10 +332,10 @@ def test_get_update_user_after_sign_out(client: SyncGoTrueClient): @pytest.mark.depends(on=[test_get_user_after_sign_out.__name__]) def test_sign_in_with_the_wrong_password(client: SyncGoTrueClient): try: - client.sign_in(email=email, password=password + "2") + client.sign_in(email=email, password=f"{password}2") assert False except APIError: - assert True + pass except Exception as e: assert False, str(e) @@ -414,8 +414,9 @@ def test_get_session_from_url_errors(client: SyncGoTrueClient): error_description = fake.email() try: client.get_session_from_url( - url=dummy_url + f"?error_description={error_description}" + url=f"{dummy_url}?error_description={error_description}" ) + assert False except APIError as e: assert e.code == 400