mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #23303 -- Added BEGIN and COMMIT statements to the output of sqlmigrate.
This commit is contained in:
@@ -93,6 +93,13 @@ class MigrateTests(MigrationTestBase):
|
||||
"""
|
||||
Makes sure that sqlmigrate does something.
|
||||
"""
|
||||
# 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)
|
||||
|
||||
# Test forwards. All the databases agree on CREATE TABLE, at least.
|
||||
stdout = six.StringIO()
|
||||
call_command("sqlmigrate", "migrations", "0001", stdout=stdout)
|
||||
|
||||
Reference in New Issue
Block a user