mirror of
https://github.com/django/django.git
synced 2025-10-24 22:26:08 +00:00
[1.7.x] Fixed #23303 -- Added BEGIN and COMMIT statements to the output of sqlmigrate.
Backport of 5853c87a45 from master.
Conflicts:
django/core/management/commands/sqlmigrate.py
tests/user_commands/tests.py
This commit is contained in:
@@ -74,6 +74,11 @@ class CommandTests(SimpleTestCase):
|
||||
if current_path is not None:
|
||||
os.environ['PATH'] = current_path
|
||||
|
||||
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')
|
||||
|
||||
|
||||
class UtilsTests(SimpleTestCase):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user