diff options
| author | martin.bohacek <bohacekm@gmail.com> | 2012-06-05 13:29:33 +0200 |
|---|---|---|
| committer | martin.bohacek <bohacekm@gmail.com> | 2012-06-05 13:29:33 +0200 |
| commit | eee791e9b216333ad0b4c6c441a88828bf9aee62 (patch) | |
| tree | 3f01e97ea9b0ac28e9c9718b35ae92d163865b1c /tests/regressiontests/admin_scripts | |
| parent | fbb73894395b728ec96c661da6f87523718c5398 (diff) | |
| parent | 840ffd80baad85c05670d6b642f654cffaa93cc3 (diff) | |
Merge branch 'master' of https://github.com/django/django
Diffstat (limited to 'tests/regressiontests/admin_scripts')
| -rw-r--r-- | tests/regressiontests/admin_scripts/tests.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/regressiontests/admin_scripts/tests.py b/tests/regressiontests/admin_scripts/tests.py index 98492ffbdd..ecb16df53a 100644 --- a/tests/regressiontests/admin_scripts/tests.py +++ b/tests/regressiontests/admin_scripts/tests.py @@ -13,13 +13,12 @@ import sys from django import conf, bin, get_version from django.conf import settings +from django.db import connection from django.test.simple import DjangoTestSuiteRunner from django.utils import unittest from django.test import LiveServerTestCase test_dir = os.path.dirname(os.path.dirname(__file__)) -expected_query_re = re.compile(r'CREATE TABLE [`"]admin_scripts_article[`"]', re.IGNORECASE) - class AdminScriptTestCase(unittest.TestCase): def write_settings(self, filename, apps=None, is_dir=False, sdict=None): @@ -859,14 +858,18 @@ class ManageAlternateSettings(AdminScriptTestCase): "alternate: manage.py builtin commands work with settings provided as argument" args = ['sqlall', '--settings=alternate_settings', 'admin_scripts'] out, err = self.run_manage(args) - self.assertRegexpMatches(out, expected_query_re) + expected = ('create table %s' + % connection.ops.quote_name('admin_scripts_article')) + self.assertTrue(expected.lower() in out.lower()) self.assertNoOutput(err) def test_builtin_with_environment(self): "alternate: manage.py builtin commands work if settings are provided in the environment" args = ['sqlall', 'admin_scripts'] out, err = self.run_manage(args, 'alternate_settings') - self.assertRegexpMatches(out, expected_query_re) + expected = ('create table %s' + % connection.ops.quote_name('admin_scripts_article')) + self.assertTrue(expected.lower() in out.lower()) self.assertNoOutput(err) def test_builtin_with_bad_settings(self): |
