summaryrefslogtreecommitdiff
path: root/tests/migrations
diff options
context:
space:
mode:
authorBaptiste Mispelon <bmispelon@gmail.com>2014-08-19 16:56:01 +0200
committerBaptiste Mispelon <bmispelon@gmail.com>2014-08-19 18:00:39 +0200
commit24d9aee1880ced5892af42f35539a5d705adf512 (patch)
tree3b2bfee34a391167598c60f10dfd27b3a0167f7a /tests/migrations
parentb3f6a0f5a1b88a9a96080531b7391f6a3a0ce5aa (diff)
[1.7.x] Fixed broken tests on Oracle after 5853c87a458f62ebd62d7809168355610de2570c.
Oracle doesn't have a `BEGIN` statement so the test would fail. Refs #23303 Backport of 54164b814cab71a8a0503743befbdcc99ae6c7a0 from master.
Diffstat (limited to 'tests/migrations')
-rw-r--r--tests/migrations/test_commands.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/migrations/test_commands.py b/tests/migrations/test_commands.py
index 8fe2a7e4a5..00b7f65ab8 100644
--- a/tests/migrations/test_commands.py
+++ b/tests/migrations/test_commands.py
@@ -6,7 +6,7 @@ import os
import shutil
from django.apps import apps
-from django.db import models
+from django.db import connection, models
from django.core.management import call_command, CommandError
from django.db.migrations import questioner
from django.test import override_settings, override_system_checks
@@ -96,9 +96,9 @@ class MigrateTests(MigrationTestBase):
# Make sure the output is wrapped in a transaction
stdout = six.StringIO()
call_command("sqlmigrate", "migrations", "0001", stdout=stdout)
- output = stdout.getvalue().lower()
- self.assertIn("begin;", output)
- self.assertIn("commit;", output)
+ output = stdout.getvalue()
+ self.assertIn(connection.ops.start_transaction_sql(), output)
+ self.assertIn(connection.ops.end_transaction_sql(), output)
# Test forwards. All the databases agree on CREATE TABLE, at least.
stdout = six.StringIO()