Simplified LongNameTest.test_sequence_name_length_limits_flush() with execute_sql_flush().
This commit is contained in:
parent
dfbd9ca065
commit
537d422942
|
@ -162,9 +162,7 @@ class LongNameTest(TransactionTestCase):
|
||||||
VLM_m2m._meta.db_table,
|
VLM_m2m._meta.db_table,
|
||||||
]
|
]
|
||||||
sql_list = connection.ops.sql_flush(no_style(), tables, reset_sequences=True)
|
sql_list = connection.ops.sql_flush(no_style(), tables, reset_sequences=True)
|
||||||
with connection.cursor() as cursor:
|
connection.ops.execute_sql_flush(connection.alias, sql_list)
|
||||||
for statement in sql_list:
|
|
||||||
cursor.execute(statement)
|
|
||||||
|
|
||||||
|
|
||||||
class SequenceResetTest(TestCase):
|
class SequenceResetTest(TestCase):
|
||||||
|
|
Loading…
Reference in New Issue