I have a set of tests in my Django application that used to pass, but at some point of the software evolution I started to get this kind of message when I run the tests:
Error: Database test_totomanager_demo couldn't be flushed. Possible reasons:
* The database isn't running or isn't configured correctly.
* At least one of the expected database tables doesn't exist.
* The SQL was invalid.
Hint: Look at the output of 'django-admin.py sqlflush'. That's the SQL this command wasn't able to run.
The full error: (1105, "MyISAM table 'video_videoinstallation' is in use (most likely by a MERGE table). Try FLUSH TABLES.")
The database is MySQL.
The exact test in which this error starts to occur is unpredictable. It's not the first time it happens, but after one or two tries it used to pass, this time I can't make the tests reach the end.
Any hint on how to avoid this?