mirror of
https://github.com/Tivix/django-rest-auth.git
synced 2024-11-25 10:33:45 +03:00
Remove Django 1.10 from tests and move imports to top of the file
This commit is contained in:
parent
fcca39643e
commit
7ad440f7a2
|
@ -5,7 +5,6 @@ python:
|
|||
- "3.6"
|
||||
env:
|
||||
- DJANGO=1.8.* DRF=3.6.*
|
||||
- DJANGO=1.10.* DRF=3.7.*
|
||||
- DJANGO=1.11.* DRF=3.7.*
|
||||
- DJANGO=2.0.* DRF=3.7.*
|
||||
install:
|
||||
|
|
|
@ -7,6 +7,11 @@ from django.utils.encoding import force_text
|
|||
from rest_framework import status
|
||||
from rest_framework import permissions
|
||||
|
||||
try:
|
||||
from django.urls import reverse
|
||||
except ImportError:
|
||||
from django.core.urlresolvers import reverse
|
||||
|
||||
|
||||
class CustomPermissionClass(permissions.BasePermission):
|
||||
message = 'You shall not pass!'
|
||||
|
@ -14,11 +19,6 @@ class CustomPermissionClass(permissions.BasePermission):
|
|||
def has_permission(self, request, view):
|
||||
return False
|
||||
|
||||
try:
|
||||
from django.urls import reverse
|
||||
except ImportError:
|
||||
from django.core.urlresolvers import reverse
|
||||
|
||||
|
||||
class APIClient(Client):
|
||||
|
||||
|
@ -30,7 +30,6 @@ class APIClient(Client):
|
|||
|
||||
|
||||
class TestsMixin(object):
|
||||
|
||||
"""
|
||||
base for API tests:
|
||||
* easy request calls, f.e.: self.post(url, data), self.get(url)
|
||||
|
|
Loading…
Reference in New Issue
Block a user