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
This commit is contained in:
Alex Gaynor 2011-10-13 18:04:12 +00:00
parent 99512d3544
commit d5a45d79fe
119 changed files with 380 additions and 187 deletions

View file

@ -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)