Skip to content

Commit

Permalink
More version craziness
Browse files Browse the repository at this point in the history
  • Loading branch information
frankwiles committed May 23, 2015
1 parent 1ec6290 commit 4ab0984
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions test_plus/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
from django.core.urlresolvers import reverse
from django.db import connections, DEFAULT_DB_ALIAS
from django.test import TestCase
from distutils.version import LooseVersion


if django.VERSION[0:2] >= 1.6:
if LooseVersion(django.get_version()) >= LooseVersion('1.6'):
from django.test.utils import CaptureQueriesContext
CAPTURE = True
else:
Expand Down Expand Up @@ -116,7 +116,7 @@ def make_user(self, username):
test_user.save()
return test_user
else:
if django.VERSION[0:2] >= 1.6:
if LooseVersion(django.get_version()) >= LooseVersion('1.6'):
from django.contrib.auth import get_user_model
User = get_user_model()
else:
Expand Down
3 changes: 2 additions & 1 deletion test_project/test_app/tests.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import django
import factory
from distutils.version import LooseVersion

from test_plus.test import TestCase

if django.VERSION[0:2] >= 1.6:
if LooseVersion(django.get_version()) >= LooseVersion('1.6'):
from django.contrib.auth import get_user_model
User = get_user_model()
else:
Expand Down

0 comments on commit 4ab0984

Please sign in to comment.