Skip to content

Commit

Permalink
Remove unused variables from settings and account backends
Browse files Browse the repository at this point in the history
  • Loading branch information
IKarbowiak committed Dec 11, 2019
1 parent 079fbe9 commit 79edbbd
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 78 deletions.
2 changes: 1 addition & 1 deletion .isort.cfg

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 0 additions & 11 deletions saleor/account/backends/__init__.py

This file was deleted.

8 changes: 0 additions & 8 deletions saleor/account/backends/facebook.py

This file was deleted.

8 changes: 0 additions & 8 deletions saleor/account/backends/google.py

This file was deleted.

27 changes: 0 additions & 27 deletions saleor/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,8 +338,6 @@ def get_bool_from_env(name, default_value):

AUTH_USER_MODEL = "account.User"

LOGIN_URL = "/account/login/"

AUTH_PASSWORD_VALIDATORS = [
{
"NAME": "django.contrib.auth.password_validation.MinimumLengthValidator",
Expand Down Expand Up @@ -406,10 +404,6 @@ def get_host():
LOW_STOCK_THRESHOLD = 10
MAX_CHECKOUT_LINE_QUANTITY = int(os.environ.get("MAX_CHECKOUT_LINE_QUANTITY", 50))

PAGINATE_BY = 16
DASHBOARD_PAGINATE_BY = 30
DASHBOARD_SEARCH_LIMIT = 5

bootstrap4 = {
"set_placeholder": False,
"set_required": False,
Expand Down Expand Up @@ -492,34 +486,13 @@ def get_host():
SEARCH_BACKEND = "saleor.search.backends.postgresql"

AUTHENTICATION_BACKENDS = [
"saleor.account.backends.facebook.CustomFacebookOAuth2",
"saleor.account.backends.google.CustomGoogleOAuth2",
"graphql_jwt.backends.JSONWebTokenBackend",
"django.contrib.auth.backends.ModelBackend",
]


GRAPHQL_JWT = {"JWT_PAYLOAD_HANDLER": "saleor.graphql.utils.create_jwt_payload"}

SOCIAL_AUTH_PIPELINE = [
"social_core.pipeline.social_auth.social_details",
"social_core.pipeline.social_auth.social_uid",
"social_core.pipeline.social_auth.auth_allowed",
"social_core.pipeline.social_auth.social_user",
"social_core.pipeline.social_auth.associate_by_email",
"social_core.pipeline.user.create_user",
"social_core.pipeline.social_auth.associate_user",
"social_core.pipeline.social_auth.load_extra_data",
"social_core.pipeline.user.user_details",
]

SOCIAL_AUTH_USERNAME_IS_FULL_EMAIL = True
SOCIAL_AUTH_USER_MODEL = AUTH_USER_MODEL
SOCIAL_AUTH_FACEBOOK_SCOPE = ["email"]
SOCIAL_AUTH_FACEBOOK_PROFILE_EXTRA_PARAMS = {"fields": "id, email"}
# As per March 2018, Facebook requires all traffic to go through HTTPS only
SOCIAL_AUTH_REDIRECT_IS_HTTPS = True

# CELERY SETTINGS
CELERY_BROKER_URL = (
os.environ.get("CELERY_BROKER_URL", os.environ.get("CLOUDAMQP_URL")) or ""
Expand Down
8 changes: 0 additions & 8 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
from PIL import Image
from prices import Money, TaxedMoney

from saleor.account.backends import BaseBackend
from saleor.account.models import (
Address,
ServiceAccount,
Expand Down Expand Up @@ -1208,13 +1207,6 @@ def authorization_key(site_settings, authorization_backend_name):
)


@pytest.fixture
def base_backend(authorization_backend_name):
base_backend = BaseBackend()
base_backend.DB_NAME = authorization_backend_name
return base_backend


@pytest.fixture
def permission_manage_staff():
return Permission.objects.get(codename="manage_staff")
Expand Down
15 changes: 0 additions & 15 deletions tests/test_registration.py

This file was deleted.

0 comments on commit 79edbbd

Please sign in to comment.