diff --git a/tests/regressiontests/admin_scripts/tests.py b/tests/regressiontests/admin_scripts/tests.py
index 98492ff..ad5da6c 100644
a
|
b
|
import sys
|
13 | 13 | |
14 | 14 | from django import conf, bin, get_version |
15 | 15 | from django.conf import settings |
| 16 | from django.db import connection |
16 | 17 | from django.test.simple import DjangoTestSuiteRunner |
17 | 18 | from django.utils import unittest |
18 | 19 | from django.test import LiveServerTestCase |
19 | 20 | |
20 | 21 | test_dir = os.path.dirname(os.path.dirname(__file__)) |
21 | | expected_query_re = re.compile(r'CREATE TABLE [`"]admin_scripts_article[`"]', re.IGNORECASE) |
22 | | |
23 | 22 | |
24 | 23 | class AdminScriptTestCase(unittest.TestCase): |
25 | 24 | def write_settings(self, filename, apps=None, is_dir=False, sdict=None): |
… |
… |
class ManageAlternateSettings(AdminScriptTestCase):
|
859 | 858 | "alternate: manage.py builtin commands work with settings provided as argument" |
860 | 859 | args = ['sqlall', '--settings=alternate_settings', 'admin_scripts'] |
861 | 860 | out, err = self.run_manage(args) |
862 | | self.assertRegexpMatches(out, expected_query_re) |
| 861 | expected = r'create table %s' % connection.ops.quote_name('admin_scripts_article') |
| 862 | self.assertTrue(expected in out.lower()) |
863 | 863 | self.assertNoOutput(err) |
864 | 864 | |
865 | 865 | def test_builtin_with_environment(self): |
866 | 866 | "alternate: manage.py builtin commands work if settings are provided in the environment" |
867 | 867 | args = ['sqlall', 'admin_scripts'] |
868 | 868 | out, err = self.run_manage(args, 'alternate_settings') |
869 | | self.assertRegexpMatches(out, expected_query_re) |
| 869 | expected = r'create table %s' % connection.ops.quote_name('admin_scripts_article') |
| 870 | self.assertTrue(expected in out.lower()) |
870 | 871 | self.assertNoOutput(err) |
871 | 872 | |
872 | 873 | def test_builtin_with_bad_settings(self): |