Simplified LongNameTest.test_sequence_name_length_limits_flush() with execute_sql_flush().

This commit is contained in:
Jon Dufresne 2020-04-18 11:48:30 -07:00 committed by GitHub
parent dfbd9ca065
commit 537d422942
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 3 deletions

View File

@ -162,9 +162,7 @@ class LongNameTest(TransactionTestCase):
VLM_m2m._meta.db_table,
]
sql_list = connection.ops.sql_flush(no_style(), tables, reset_sequences=True)
with connection.cursor() as cursor:
for statement in sql_list:
cursor.execute(statement)
connection.ops.execute_sql_flush(connection.alias, sql_list)
class SequenceResetTest(TestCase):