Skip to content

Commit

Permalink
Optionally import compatibility packages.
Browse files Browse the repository at this point in the history
  • Loading branch information
tkaemming committed Sep 16, 2012
1 parent ef1f81f commit ad67924
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions subdomains/tests/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,16 @@
from django.test import TestCase
from django.template import Context, Template

from subdomains.compat.requestfactory import RequestFactory
from subdomains.compat.tests import override_settings
try:
from django.test.client import RequestFactory
except ImportError:
from subdomains.compat.requestfactory import RequestFactory

try:
from django.test.utils import override_settings
except ImportError:
from subdomains.compat.tests import override_settings

from subdomains.middleware import (SubdomainMiddleware,
SubdomainURLRoutingMiddleware)
from subdomains.utils import reverse, urljoin
Expand Down

0 comments on commit ad67924

Please sign in to comment.