Skip to content

Commit dab68d8

Browse files
committed
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
1 parent a337f59 commit dab68d8

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

ietf/tests.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
from django.test import TestCase
1111
from django.conf import settings
1212
from django.db import connection
13+
from django.core import management
1314
import ietf.urls
1415

1516

@@ -123,7 +124,9 @@ def setUp(self):
123124
self.testdb = settings.DATABASE_NAME
124125
connection.close()
125126
settings.DATABASE_NAME = startup_database
126-
connection.cursor()
127+
# Install updated fixtures:
128+
# Also has the side effect of creating the database connection.
129+
management.syncdb(verbosity=1, interactive=False)
127130

128131
def tearDown(self):
129132
# Revert to using the test database

0 commit comments

Comments
 (0)