Skip to content
This repository has been archived by the owner on Jan 4, 2022. It is now read-only.

Commit

Permalink
make tests compatible through 1.4-1.7
Browse files Browse the repository at this point in the history
  • Loading branch information
masci committed Jul 3, 2014
1 parent 4f3f99e commit 480b447
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 15 deletions.
15 changes: 0 additions & 15 deletions oauth2_provider/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -1,15 +0,0 @@
from .test_generator import *
from .test_validators import *
from .test_models import *
from .test_mixins import *
from .test_authorization_code import *
from .test_implicit import *
from .test_password import *
from .test_client_credential import *
from .test_scopes import *
from .test_rest_framework import *
from .test_application_views import *
from .test_decorators import *
from .test_oauth2_backends import *
from .test_auth_backends import *
from .test_oauth2_validators import *
8 changes: 8 additions & 0 deletions oauth2_provider/tests/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,3 +120,11 @@
OAUTH2_PROVIDER = {
'_SCOPES': ['example']
}

import django

if django.VERSION[:2] < (1, 6):
TEST_RUNNER = 'discover_runner.DiscoverRunner'
INSTALLED_APPS += ('discover_runner',)
else:
TEST_RUNNER = 'django.test.runner.DiscoverRunner'
6 changes: 6 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,14 @@ deps =
basepython = python2.6
deps =
Django<1.5
django-discover-runner
{[testenv]deps}

[testenv:py26-django15]
basepython = python2.6
deps =
Django<1.6
django-discover-runner
{[testenv]deps}

[testenv:py26-django16]
Expand All @@ -34,12 +36,14 @@ deps =
basepython = python2.7
deps =
Django<1.5
django-discover-runner
{[testenv]deps}

[testenv:py27-django15]
basepython = python2.7
deps =
Django<1.6
django-discover-runner
{[testenv]deps}

[testenv:py27-django16]
Expand All @@ -58,6 +62,7 @@ deps =
basepython = python3.3
deps =
Django<1.6
django-discover-runner
{[testenv]deps}

[testenv:py33-django16]
Expand All @@ -76,6 +81,7 @@ deps =
basepython = python3.4
deps =
Django<1.6
django-discover-runner
{[testenv]deps}

[testenv:py34-django16]
Expand Down

0 comments on commit 480b447

Please sign in to comment.