diff options
| author | Andrew Godwin <andrew@aeracode.org> | 2013-09-24 11:00:00 +0100 |
|---|---|---|
| committer | Andrew Godwin <andrew@aeracode.org> | 2013-09-24 11:00:00 +0100 |
| commit | 6ede1db331d59e9a89eaa65101629d0ff642f8fc (patch) | |
| tree | 56d92c6aceaa4204000e2e5f663611447b37e177 /tests/schema | |
| parent | 16ceb05b4751425ed16ee0eddd0c533f067344b2 (diff) | |
Fixed #21151 -- Bad cleanup in schema M2M repoint test
Diffstat (limited to 'tests/schema')
| -rw-r--r-- | tests/schema/tests.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/schema/tests.py b/tests/schema/tests.py index f6125ee9f3..9aac9fb5a7 100644 --- a/tests/schema/tests.py +++ b/tests/schema/tests.py @@ -307,6 +307,9 @@ class SchemaTests(TransactionTestCase): else: self.fail("No FK constraint for uniquetest_id found") finally: + # Cleanup through table separately + with connection.schema_editor() as editor: + editor.remove_field(BookWithM2M, BookWithM2M._meta.get_field_by_name("uniques")[0]) # Cleanup model states BookWithM2M._meta.local_many_to_many.remove(new_field) del BookWithM2M._meta._m2m_cache |
