Skip to content

Commit 7ad440f

Browse files
committed
Remove Django 1.10 from tests and move imports to top of the file
1 parent fcca396 commit 7ad440f

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ python:
55
- "3.6"
66
env:
77
- DJANGO=1.8.* DRF=3.6.*
8-
- DJANGO=1.10.* DRF=3.7.*
98
- DJANGO=1.11.* DRF=3.7.*
109
- DJANGO=2.0.* DRF=3.7.*
1110
install:

rest_auth/tests/mixins.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,18 @@
77
from rest_framework import status
88
from rest_framework import permissions
99

10+
try:
11+
from django.urls import reverse
12+
except ImportError:
13+
from django.core.urlresolvers import reverse
14+
1015

1116
class CustomPermissionClass(permissions.BasePermission):
1217
message = 'You shall not pass!'
1318

1419
def has_permission(self, request, view):
1520
return False
1621

17-
try:
18-
from django.urls import reverse
19-
except ImportError:
20-
from django.core.urlresolvers import reverse
21-
2222

2323
class APIClient(Client):
2424

@@ -30,7 +30,6 @@ def options(self, path, data='', content_type=MULTIPART_CONTENT, follow=False, *
3030

3131

3232
class TestsMixin(object):
33-
3433
"""
3534
base for API tests:
3635
* easy request calls, f.e.: self.post(url, data), self.get(url)

0 commit comments

Comments
 (0)