mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed broken tests on Oracle after 5853c87a45.
Oracle doesn't have a `BEGIN` statement so the test would fail. Refs #23303
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user