diff options
author | Jonah BrĂ¼chert <jbb@kaidan.im> | 2024-05-23 04:02:21 +0200 |
---|---|---|
committer | Jonah BrĂ¼chert <jbb@kaidan.im> | 2024-05-23 04:31:59 +0200 |
commit | 5cd643861b48768a90788f9d6ad3bacf7566e586 (patch) | |
tree | 1195b2a0ea2ed08eabc7dfef0bbb9e5366c472e4 /testsuite | |
parent | 44af447d030e519c4ac22175507dac3e26ec4b05 (diff) | |
download | bcfg2-5cd643861b48768a90788f9d6ad3bacf7566e586.tar.gz bcfg2-5cd643861b48768a90788f9d6ad3bacf7566e586.tar.bz2 bcfg2-5cd643861b48768a90788f9d6ad3bacf7566e586.zip |
Remove broken django version checks
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/common.py | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/testsuite/common.py b/testsuite/common.py index e0ff3ed19..53eff4d37 100644 --- a/testsuite/common.py +++ b/testsuite/common.py @@ -226,21 +226,15 @@ class DBModelTestCase(Bcfg2TestCase): dbfile = django.conf.settings.DATABASES['default']['NAME'] # Close all connections to the old database - if django.VERSION[0] == 1 and django.VERSION[1] >= 7: - for connection in django.db.connections.all(): - connection.close() - else: - django.db.close_connection() - + for connection in django.db.connections.all(): + connection.close() + # Remove old database if os.path.exists(dbfile): os.unlink(dbfile) self.assertFalse(os.path.exists(dbfile)) # Create new - if django.VERSION[0] == 1 and django.VERSION[1] < 7: - django.core.management.call_command('syncdb', interactive=False, - verbosity=1) django.core.management.call_command('migrate', interactive=False, verbosity=1) |