Skip to content

Commit

Permalink
Fix ruff formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
bulya committed Oct 23, 2024
1 parent 34829b7 commit f3f8502
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@ def test_login_api_success(
user = user_account()
mocked_validate = mocker.patch(f"{LOGIN_SERIALIZER_PATH}.validate", return_value={"user": user})
mocked_response = Response(status=status.HTTP_204_NO_CONTENT)
mocked_login = mocker.patch(
"{{ cookiecutter.project_slug }}.apps.accounts.services.login.LoginService.login", return_value=mocked_response
)
mocked_login = mocker.patch("{{ cookiecutter.project_slug }}.apps.accounts.services.login.LoginService.login", return_value=mocked_response)

data = {"email": "[email protected]", "password": "super-secret-password"} # nosec
response = unauthorized_api_client.post(reverse("api-v1-accounts:login"), data)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@
def test_registration_api_success(unauthorized_api_client: CustomAPIClient, mocker: MockerFixture) -> None:
assert not UserAccount.objects.exists()
mocked_response = Response(status=status.HTTP_204_NO_CONTENT)
mocked_login = mocker.patch(
"{{ cookiecutter.project_slug }}.apps.accounts.services.login.LoginService.login", return_value=mocked_response
)
mocked_login = mocker.patch("{{ cookiecutter.project_slug }}.apps.accounts.services.login.LoginService.login", return_value=mocked_response)

data = {
"email": "[email protected]",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# ruff: noqa: F403
from .{{ cookiecutter.project_slug }} import *
from .contrib import *
from .django import *
from .{{ cookiecutter.project_slug }} import *
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@

REST_FRAMEWORK = {
"COERCE_DECIMAL_TO_STRING": False,
"DEFAULT_AUTHENTICATION_CLASSES": (
"{{ cookiecutter.project_slug }}.apps.accounts.api.authentication.CustomSessionAuthentication",
),
"DEFAULT_AUTHENTICATION_CLASSES": ("{{ cookiecutter.project_slug }}.apps.accounts.api.authentication.CustomSessionAuthentication",),
"DEFAULT_FILTER_BACKENDS": ("django_filters.rest_framework.DjangoFilterBackend",),
"DEFAULT_PAGINATION_CLASS": "rest_framework.pagination.LimitOffsetPagination",
"DEFAULT_PARSER_CLASSES": ("rest_framework.parsers.JSONParser",),
Expand Down

0 comments on commit f3f8502

Please sign in to comment.