This commit is contained in:
mariodev 2016-06-28 20:20:53 +02:00
parent 118b173282
commit c4e7bdc77f
4 changed files with 3 additions and 11 deletions

View File

@ -6,7 +6,6 @@ from rest_framework.response import Response
from rest_framework.permissions import AllowAny from rest_framework.permissions import AllowAny
from rest_framework.generics import CreateAPIView from rest_framework.generics import CreateAPIView
from rest_framework import status from rest_framework import status
from rest_framework.exceptions import MethodNotAllowed
from allauth.account.views import ConfirmEmailView from allauth.account.views import ConfirmEmailView
from allauth.account.utils import complete_signup from allauth.account.utils import complete_signup

View File

@ -1,16 +1,9 @@
# Moved in Django 1.8 from django to tests/auth_tests/urls.py # Moved in Django 1.8 from django to tests/auth_tests/urls.py
from django.conf.urls import include, url from django.conf.urls import url
from django.contrib import admin
from django.contrib.auth import views from django.contrib.auth import views
from django.contrib.auth.decorators import login_required 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.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 # special urls for auth test cases

View File

@ -132,7 +132,7 @@ class APITestCase1(TestCase, BaseAPITestCase):
self.post(self.password_change_url, status_code=403) self.post(self.password_change_url, status_code=403)
# create user # 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) self.post(self.login_url, data=payload, status_code=200)

View File

@ -49,7 +49,7 @@ class BaseAPITestCase(object):
self.response.json = {} self.response.json = {}
if is_json and self.response.content: if is_json and self.response.content:
self.response.json = json.loads(force_text(self.response.content)) self.response.json = json.loads(force_text(self.response.content))
if status_code: if status_code:
self.assertEqual(self.response.status_code, status_code) self.assertEqual(self.response.status_code, status_code)