diff options
| author | Anssi Kääriäinen <akaariai@gmail.com> | 2013-02-23 01:06:45 +0200 |
|---|---|---|
| committer | Anssi Kääriäinen <akaariai@gmail.com> | 2013-02-23 01:08:48 +0200 |
| commit | dcf651c27edff13236fda0a480059b57dbe6e074 (patch) | |
| tree | 2f1abeef76d60325c1b51c806b248012651dc7bc | |
| parent | e5a8df06be8ce82f5ba10dca5087339704ffd0fa (diff) | |
Fixed Oracle specific failures in commands_sql tests
| -rw-r--r-- | tests/regressiontests/commands_sql/tests.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/regressiontests/commands_sql/tests.py b/tests/regressiontests/commands_sql/tests.py index 205a295cfe..723e5cc3f7 100644 --- a/tests/regressiontests/commands_sql/tests.py +++ b/tests/regressiontests/commands_sql/tests.py @@ -15,12 +15,19 @@ class SQLCommandsTestCase(TestCase): def test_sql_create(self): app = models.get_app('commands_sql') output = sql_create(app, no_style(), connections[DEFAULT_DB_ALIAS]) - six.assertRegex(self, output[0], r'^CREATE TABLE .commands_sql_book.*') + # Lower so that Oracle's upper case tbl names wont break + sql = output[0].lower() + six.assertRegex(self, sql, r'^create table .commands_sql_book.*') def test_sql_delete(self): app = models.get_app('commands_sql') output = sql_delete(app, no_style(), connections[DEFAULT_DB_ALIAS]) - six.assertRegex(self, output[0], r'^DROP TABLE .commands_sql_book.*') + # Oracle produces DROP SEQUENCE and DROP TABLE for this command. + if connections[DEFAULT_DB_ALIAS].vendor == 'oracle': + sql = output[1].lower() + else: + sql = output[0].lower() + six.assertRegex(self, sql, r'^drop table .commands_sql_book.*') def test_sql_indexes(self): app = models.get_app('commands_sql') |
