Django: "Cannot add foreign key constraint"
Upgraded to Django 1.8 and now you get this error when you run your tests?
Have you created migrations for all your apps? If not, you may well be hitting the problem that the database tables are being created in the wrong order, which will give you this error.
If you have an existing Django 1.7 or earlier project, then you need to create the initial migration files, and then fake the initial migration, as described here