Fixes Imports

This commit is contained in:
Michael 2020-02-29 19:54:53 -06:00
parent 41dce8885a
commit 331094b6a7
7 changed files with 14 additions and 40 deletions

View File

@ -1,26 +0,0 @@
language: python
python:
- "2.7"
- "3.5"
- "3.6"
env:
- DJANGO=1.11.* DRF=3.7.*
- DJANGO=1.11.* DRF=3.8.*
- DJANGO=2.0.* DRF=3.7.*
- DJANGO=2.0.* DRF=3.8.*
install:
- pip install -q Django==$DJANGO djangorestframework==$DRF
- pip install coveralls
- pip install -r dj_rest_auth/tests/requirements.pip
script:
- coverage run --source=dj_rest_auth setup.py test
after_success:
- coveralls
before_script:
- flake8 . --config=flake8
matrix:
exclude:
- python: "2.7"
env: DJANGO=2.0.* DRF=3.7.*
- python: "2.7"
env: DJANGO=2.0.* DRF=3.8.*

View File

@ -19,16 +19,16 @@ from allauth.socialaccount import signals
from allauth.socialaccount.adapter import get_adapter as get_social_adapter
from allauth.socialaccount.models import SocialAccount
from rest_auth.app_settings import (TokenSerializer,
from dj_rest_auth.app_settings import (TokenSerializer,
JWTSerializer,
create_token)
from rest_auth.models import TokenModel
from rest_auth.registration.serializers import (VerifyEmailSerializer,
from dj_rest_auth.models import TokenModel
from dj_rest_auth.registration.serializers import (VerifyEmailSerializer,
SocialLoginSerializer,
SocialAccountSerializer,
SocialConnectSerializer)
from rest_auth.utils import jwt_encode
from rest_auth.views import LoginView
from dj_rest_auth.utils import jwt_encode
from dj_rest_auth.views import LoginView
from .app_settings import RegisterSerializer, register_permission_classes
sensitive_post_parameters_m = method_decorator(

View File

@ -90,8 +90,8 @@ INSTALLED_APPS = [
'rest_framework',
'rest_framework.authtoken',
'rest_auth',
'rest_auth.registration',
'dj_rest_auth',
'dj_rest_auth.registration',
'rest_framework_jwt'
]

View File

@ -8,8 +8,8 @@ from allauth.account import app_settings as account_app_settings
from rest_framework import status
from rest_framework.test import APIRequestFactory
from rest_auth.registration.views import RegisterView
from rest_auth.registration.app_settings import register_permission_classes
from dj_rest_auth.registration.views import RegisterView
from dj_rest_auth.registration.app_settings import register_permission_classes
from .mixins import TestsMixin, CustomPermissionClass

View File

@ -7,12 +7,12 @@ from allauth.socialaccount.providers.twitter.views import TwitterOAuthAdapter
from rest_framework.decorators import api_view
from rest_auth.urls import urlpatterns
from rest_auth.registration.views import (
from dj_rest_auth.urls import urlpatterns
from dj_rest_auth.registration.views import (
SocialLoginView, SocialConnectView, SocialAccountListView,
SocialAccountDisconnectView
)
from rest_auth.social_serializers import (
from dj_rest_auth.social_serializers import (
TwitterLoginSerializer, TwitterConnectSerializer
)

View File

@ -1,6 +1,6 @@
from django.conf.urls import url
from rest_auth.views import (
from dj_rest_auth.views import (
LoginView, LogoutView, UserDetailsView, PasswordChangeView,
PasswordResetView, PasswordResetConfirmView
)

View File

@ -17,7 +17,7 @@ def runtests():
test_runner = TestRunner(verbosity=1, interactive=True)
if hasattr(django, 'setup'):
django.setup()
failures = test_runner.run_tests(['rest_auth'])
failures = test_runner.run_tests(['dj_rest_auth'])
sys.exit(bool(failures))
if __name__ == '__main__':