From c4e7bdc77f03b2e1dc4a5f98a78f8133c53719c4 Mon Sep 17 00:00:00 2001 From: mariodev Date: Tue, 28 Jun 2016 20:20:53 +0200 Subject: [PATCH] pep8 --- rest_auth/registration/views.py | 1 - rest_auth/tests/django_urls.py | 9 +-------- rest_auth/tests/test_api.py | 2 +- rest_auth/tests/test_base.py | 2 +- 4 files changed, 3 insertions(+), 11 deletions(-) diff --git a/rest_auth/registration/views.py b/rest_auth/registration/views.py index c38f317..713c46e 100644 --- a/rest_auth/registration/views.py +++ b/rest_auth/registration/views.py @@ -6,7 +6,6 @@ from rest_framework.response import Response from rest_framework.permissions import AllowAny from rest_framework.generics import CreateAPIView from rest_framework import status -from rest_framework.exceptions import MethodNotAllowed from allauth.account.views import ConfirmEmailView from allauth.account.utils import complete_signup diff --git a/rest_auth/tests/django_urls.py b/rest_auth/tests/django_urls.py index 9fb6424..c1fb050 100644 --- a/rest_auth/tests/django_urls.py +++ b/rest_auth/tests/django_urls.py @@ -1,16 +1,9 @@ # Moved in Django 1.8 from django to tests/auth_tests/urls.py -from django.conf.urls import include, url -from django.contrib import admin +from django.conf.urls import url from django.contrib.auth import views from django.contrib.auth.decorators import login_required -from django.contrib.auth.forms import AuthenticationForm from django.contrib.auth.urls import urlpatterns -from django.contrib.messages.api import info -from django.http import HttpRequest, HttpResponse -from django.shortcuts import render -from django.template import RequestContext, Template -from django.views.decorators.cache import never_cache # special urls for auth test cases diff --git a/rest_auth/tests/test_api.py b/rest_auth/tests/test_api.py index b3daec4..e966d3f 100644 --- a/rest_auth/tests/test_api.py +++ b/rest_auth/tests/test_api.py @@ -132,7 +132,7 @@ class APITestCase1(TestCase, BaseAPITestCase): self.post(self.password_change_url, status_code=403) # create user - user = get_user_model().objects.create_user(self.EMAIL, email=self.EMAIL, password=self.PASS) + get_user_model().objects.create_user(self.EMAIL, email=self.EMAIL, password=self.PASS) self.post(self.login_url, data=payload, status_code=200) diff --git a/rest_auth/tests/test_base.py b/rest_auth/tests/test_base.py index 0c18afb..992b158 100644 --- a/rest_auth/tests/test_base.py +++ b/rest_auth/tests/test_base.py @@ -49,7 +49,7 @@ class BaseAPITestCase(object): self.response.json = {} if is_json and self.response.content: self.response.json = json.loads(force_text(self.response.content)) - + if status_code: self.assertEqual(self.response.status_code, status_code)