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:
Baptiste Mispelon 2014-08-19 16:56:01 +02:00
parent 6295ea0027
commit 54164b814c
2 changed files with 8 additions and 5 deletions

View file

@ -2,6 +2,7 @@ import os
import sys
import warnings
from django.db import connection
from django.core import management
from django.core.management import CommandError
from django.core.management.utils import find_command, popen_wrapper
@ -131,7 +132,9 @@ class CommandTests(SimpleTestCase):
def test_output_transaction(self):
out = StringIO()
management.call_command('transaction', stdout=out, no_color=True)
self.assertEqual(out.getvalue(), 'BEGIN;\nHello!\n\nCOMMIT;\n')
output = out.getvalue().strip()
self.assertTrue(output.startswith(connection.ops.start_transaction_sql()))
self.assertTrue(output.endswith(connection.ops.end_transaction_sql()))
class UtilsTests(SimpleTestCase):