summaryrefslogtreecommitdiff
path: root/tests/modeltests/proxy_model_inheritance/tests.py
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2011-10-13 18:04:12 +0000
committerAlex Gaynor <alex.gaynor@gmail.com>2011-10-13 18:04:12 +0000
commitd5a45d79fe03cad93ab5761860e9bb6fc1db4c86 (patch)
tree0fd5b87753749027117c088543e1ff8fdc7b945b /tests/modeltests/proxy_model_inheritance/tests.py
parent99512d3544cd792e14927c24a8f92389c4006122 (diff)
Convert all modeltests to use absolute imports, rather than relative ones.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16975 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/modeltests/proxy_model_inheritance/tests.py')
-rw-r--r--tests/modeltests/proxy_model_inheritance/tests.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/modeltests/proxy_model_inheritance/tests.py b/tests/modeltests/proxy_model_inheritance/tests.py
index eb8e47b726..82f4ea6821 100644
--- a/tests/modeltests/proxy_model_inheritance/tests.py
+++ b/tests/modeltests/proxy_model_inheritance/tests.py
@@ -6,6 +6,8 @@ for the proxied model (as described in #12286). This test creates two dummy
apps and calls syncdb, then verifies that the table has been created.
"""
+from __future__ import absolute_import
+
import os
import sys
@@ -15,6 +17,7 @@ from django.db.models.loading import load_app
from django.test import TransactionTestCase
from django.test.utils import override_settings
+
# @override_settings(INSTALLED_APPS=('app1', 'app2'))
class ProxyModelInheritanceTests(TransactionTestCase):
@@ -28,9 +31,8 @@ class ProxyModelInheritanceTests(TransactionTestCase):
def test_table_exists(self):
call_command('syncdb', verbosity=0)
- global ProxyModel, NiceModel
- from app1.models import ProxyModel
- from app2.models import NiceModel
+ from .app1.models import ProxyModel
+ from .app2.models import NiceModel
self.assertEqual(NiceModel.objects.all().count(), 0)
self.assertEqual(ProxyModel.objects.all().count(), 0)