F. Gabriel Gosselin avatar F. Gabriel Gosselin committed 8b78616

Make unittests clean up after themselves

Comments (0)

Files changed (1)

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)
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.