Permalink
Browse files

Fixed #21151 -- Bad cleanup in schema M2M repoint test

  • Loading branch information...
1 parent 16ceb05 commit 6ede1db331d59e9a89eaa65101629d0ff642f8fc @andrewgodwin andrewgodwin committed Sep 24, 2013
Showing with 3 additions and 0 deletions.
  1. +3 −0 tests/schema/tests.py
@@ -307,6 +307,9 @@ def test_m2m_repoint(self):
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

0 comments on commit 6ede1db

Please sign in to comment.