diff options
| author | Baptiste Mispelon <bmispelon@gmail.com> | 2014-08-19 16:56:01 +0200 |
|---|---|---|
| committer | Baptiste Mispelon <bmispelon@gmail.com> | 2014-08-19 17:58:30 +0200 |
| commit | 54164b814cab71a8a0503743befbdcc99ae6c7a0 (patch) | |
| tree | 0c73deeadbabf3ad78f5264411fde82cd048f686 /tests/user_commands | |
| parent | 6295ea0027d808dcc309aa42cc58f6fdf172c3fc (diff) | |
Fixed broken tests on Oracle after 5853c87a458f62ebd62d7809168355610de2570c.
Oracle doesn't have a `BEGIN` statement so the test would
fail.
Refs #23303
Diffstat (limited to 'tests/user_commands')
| -rw-r--r-- | tests/user_commands/tests.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/user_commands/tests.py b/tests/user_commands/tests.py index 58ad0cbe89..32224ef277 100644 --- a/tests/user_commands/tests.py +++ b/tests/user_commands/tests.py @@ -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): |
