Run syncdb before running tests on the populated database, to apply any new fixtures which are part of the svn checkout we're testing

- Legacy-Id: 426
This commit is contained in:
Henrik Levkowetz 2007-06-16 11:20:15 +00:00
parent a337f59588
commit dab68d8d69

View file

@ -10,6 +10,7 @@ import django.test.simple
from django.test import TestCase from django.test import TestCase
from django.conf import settings from django.conf import settings
from django.db import connection from django.db import connection
from django.core import management
import ietf.urls import ietf.urls
@ -123,7 +124,9 @@ class UrlTestCase(TestCase):
self.testdb = settings.DATABASE_NAME self.testdb = settings.DATABASE_NAME
connection.close() connection.close()
settings.DATABASE_NAME = startup_database settings.DATABASE_NAME = startup_database
connection.cursor() # Install updated fixtures:
# Also has the side effect of creating the database connection.
management.syncdb(verbosity=1, interactive=False)
def tearDown(self): def tearDown(self):
# Revert to using the test database # Revert to using the test database