Skip to content

Commit 480b447

Browse files
committed
make tests compatible through 1.4-1.7
1 parent 4f3f99e commit 480b447

File tree

3 files changed

+14
-15
lines changed

3 files changed

+14
-15
lines changed

oauth2_provider/tests/__init__.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +0,0 @@
1-
from .test_generator import *
2-
from .test_validators import *
3-
from .test_models import *
4-
from .test_mixins import *
5-
from .test_authorization_code import *
6-
from .test_implicit import *
7-
from .test_password import *
8-
from .test_client_credential import *
9-
from .test_scopes import *
10-
from .test_rest_framework import *
11-
from .test_application_views import *
12-
from .test_decorators import *
13-
from .test_oauth2_backends import *
14-
from .test_auth_backends import *
15-
from .test_oauth2_validators import *

oauth2_provider/tests/settings.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,3 +120,11 @@
120120
OAUTH2_PROVIDER = {
121121
'_SCOPES': ['example']
122122
}
123+
124+
import django
125+
126+
if django.VERSION[:2] < (1, 6):
127+
TEST_RUNNER = 'discover_runner.DiscoverRunner'
128+
INSTALLED_APPS += ('discover_runner',)
129+
else:
130+
TEST_RUNNER = 'django.test.runner.DiscoverRunner'

tox.ini

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,14 @@ deps =
1616
basepython = python2.6
1717
deps =
1818
Django<1.5
19+
django-discover-runner
1920
{[testenv]deps}
2021

2122
[testenv:py26-django15]
2223
basepython = python2.6
2324
deps =
2425
Django<1.6
26+
django-discover-runner
2527
{[testenv]deps}
2628

2729
[testenv:py26-django16]
@@ -34,12 +36,14 @@ deps =
3436
basepython = python2.7
3537
deps =
3638
Django<1.5
39+
django-discover-runner
3740
{[testenv]deps}
3841

3942
[testenv:py27-django15]
4043
basepython = python2.7
4144
deps =
4245
Django<1.6
46+
django-discover-runner
4347
{[testenv]deps}
4448

4549
[testenv:py27-django16]
@@ -58,6 +62,7 @@ deps =
5862
basepython = python3.3
5963
deps =
6064
Django<1.6
65+
django-discover-runner
6166
{[testenv]deps}
6267

6368
[testenv:py33-django16]
@@ -76,6 +81,7 @@ deps =
7681
basepython = python3.4
7782
deps =
7883
Django<1.6
84+
django-discover-runner
7985
{[testenv]deps}
8086

8187
[testenv:py34-django16]

0 commit comments

Comments
 (0)