mirror of
https://github.com/django/django.git
synced 2025-08-31 15:57:45 +00:00
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:
parent
99512d3544
commit
d5a45d79fe
119 changed files with 380 additions and 187 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue