Commits

F. Gabriel Gosselin committed 8b78616

Make unittests clean up after themselves

  • Participants
  • Parent commits 719781d

Comments (0)

Files changed (1)

File south/tests/db_mysql.py

+# Additional MySQL-specific tests
+# Written by: F. Gabriel Gosselin <gabrielNOSPAM@evidens.ca>
+# Based on tests by: aarranz
 import unittest
 
 from south.db import db, generic, mysql
 from django.db import connection, models
 
+
 class TestMySQLOperations(unittest.TestCase):
     """MySQL-specific tests"""
     def setUp(self):
         self.assertEquals(constraint_name, constraint)
         references = db._lookup_constraint_references(main_table, constraint)
         self.assertEquals((reference_table, 'id'), references)
+        db.delete_table(main_table)
+        db.delete_table(reference_table)
 
     def test_reverse_column_constraint(self):
         """Tests that referred column in a foreign key (ex. id) is found"""
         (cname, rev_table, rev_column) = tuple(inverse)[0]
         self.assertEquals(main_table, rev_table)
         self.assertEquals('foreign_id', rev_column)
+        db.delete_table(main_table)
+        db.delete_table(reference_table)