mirror of
https://github.com/django/django.git
synced 2025-08-04 10:59:45 +00:00
parent
4daf570b98
commit
c6e6d4eeb7
26 changed files with 142 additions and 2 deletions
|
@ -22,6 +22,8 @@ class ProxyModelInheritanceTests(TransactionTestCase):
|
|||
apps and calls syncdb, then verifies that the table has been created.
|
||||
"""
|
||||
|
||||
available_apps = []
|
||||
|
||||
def setUp(self):
|
||||
self.old_sys_path = sys.path[:]
|
||||
sys.path.append(os.path.dirname(os.path.abspath(upath(__file__))))
|
||||
|
@ -38,7 +40,11 @@ class ProxyModelInheritanceTests(TransactionTestCase):
|
|||
del cache.app_models['app2']
|
||||
|
||||
def test_table_exists(self):
|
||||
call_command('syncdb', verbosity=0)
|
||||
try:
|
||||
cache.set_available_apps(settings.INSTALLED_APPS)
|
||||
call_command('syncdb', verbosity=0)
|
||||
finally:
|
||||
cache.unset_available_apps()
|
||||
from .app1.models import ProxyModel
|
||||
from .app2.models import NiceModel
|
||||
self.assertEqual(NiceModel.objects.all().count(), 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue