diff --git a/.travis.yml b/.travis.yml index 8470da1..b05a3f7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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: diff --git a/rest_auth/tests/mixins.py b/rest_auth/tests/mixins.py index 91f0001..220a28d 100644 --- a/rest_auth/tests/mixins.py +++ b/rest_auth/tests/mixins.py @@ -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)