Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Dec 16, 2024
1 parent e338bb8 commit ab3deda
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion authentication/middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ def process_exception(self, request, exception):

if url: # noqa: RET503
url += (
"?" in url and "&" or "?"
("?" in url and "&") or "?"
) + f"message={quote(message)}&backend={backend_name}"
return redirect(url)
2 changes: 1 addition & 1 deletion authentication/pipeline/user_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def mock_create_user_strategy(mocker):


@pytest.fixture
def application(settings): # noqa: PT004
def application(settings):
"""Test data and settings needed for create_edx_user tests"""
settings.OPENEDX_API_BASE_URL = "http://example.com"

Expand Down
4 changes: 2 additions & 2 deletions conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@


@pytest.fixture(autouse=True)
def default_settings(monkeypatch, settings): # noqa: PT004
def default_settings(monkeypatch, settings):
"""Set default settings for all tests"""
monkeypatch.setenv("DJANGO_SETTINGS_MODULE", "main.settings")

Expand All @@ -18,7 +18,7 @@ def default_settings(monkeypatch, settings): # noqa: PT004


@pytest.fixture(autouse=True)
def mocked_product_signal(mocker): # noqa: PT004
def mocked_product_signal(mocker):
"""Mock hubspot_sync signals"""
mocker.patch("ecommerce.signals.sync_hubspot_product")

Expand Down
2 changes: 1 addition & 1 deletion ecommerce/api_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def user(db):


@pytest.fixture(autouse=True)
def payment_gateway_settings(): # noqa: PT004
def payment_gateway_settings():
settings.MITOL_PAYMENT_GATEWAY_CYBERSOURCE_SECURITY_KEY = "Test Security Key"
settings.MITOL_PAYMENT_GATEWAY_CYBERSOURCE_ACCESS_KEY = "Test Access Key"
settings.MITOL_PAYMENT_GATEWAY_CYBERSOURCE_PROFILE_ID = uuid.uuid4()
Expand Down
2 changes: 1 addition & 1 deletion ecommerce/views_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def user(db):


@pytest.fixture(autouse=True)
def payment_gateway_settings(): # noqa: PT004
def payment_gateway_settings():
settings.MITOL_PAYMENT_GATEWAY_CYBERSOURCE_SECURITY_KEY = "Test Security Key"
settings.MITOL_PAYMENT_GATEWAY_CYBERSOURCE_ACCESS_KEY = "Test Access Key"
settings.MITOL_PAYMENT_GATEWAY_CYBERSOURCE_PROFILE_ID = uuid.uuid4()
Expand Down
6 changes: 3 additions & 3 deletions fixtures/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,13 +131,13 @@ def user_profile_dict():


@pytest.fixture
def nplusone_fail(settings): # noqa: PT004
def nplusone_fail(settings):
"""Configures the nplusone app to raise errors"""
settings.NPLUSONE_RAISE = True


@pytest.fixture(autouse=True)
def webpack_stats(settings): # noqa: PT004
def webpack_stats(settings):
"""Mocks out webpack stats"""

directory = "scripts/test/data/webpack-stats/"
Expand All @@ -151,7 +151,7 @@ def webpack_stats(settings): # noqa: PT004


@pytest.fixture
def raise_nplusone(request): # noqa: PT004
def raise_nplusone(request):
if request.node.get_closest_marker("skip_nplusone"):
yield
else:
Expand Down
2 changes: 1 addition & 1 deletion mail/api_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@


@pytest.fixture
def email_settings(settings): # noqa: PT004
def email_settings(settings):
"""Default settings for email tests"""
settings.MAILGUN_RECIPIENT_OVERRIDE = None

Expand Down
2 changes: 1 addition & 1 deletion users/serializers_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@


@pytest.fixture
def application(settings): # noqa: PT004
def application(settings):
"""Test data and settings needed for create_edx_user tests"""
settings.OPENEDX_API_BASE_URL = "http://example.com"

Expand Down

0 comments on commit ab3deda

Please sign in to comment.