Q:

Django Tests Pass with SQLite, Fail with Other DB's

My Django tests all pass when I use the built-in SQLite as my database.  However, when I switch to the built-in MySQL and PostgreSQL, they fail.  (All local database servers.)
The connections to the DB are live enough -- the database is created and migrations applied.  But the tests aren't even hitting views.py before the test server returns a 500 (and no additional explanation beyond "Server Error", even in debug mode).
I'm using Django with Django REST Framework, and testing with REST Framework's RequestsClient class.  My test fixtures are generated with Factory Boy.
Any ideas?  I have a vague feeling it's to do with Factory Boy but nothing concrete.  The fact that it fails with multiple databases, and successfully builds the tables, makes me suspect it's not the database itself.

Versions tested:

Django 1.11.6 and 1.11.9
Django REST Framework 3.7.1
Postgres 10.1
MySQL 5.7.21
Factory Boy 2.9.2

A:

It turned out to be because of the testing class I was using.  Apparently, although it is not right now stated in the documentation, the Django REST Framework RequestsClient class can only be used with the DRF APILiveServerTestCase.  That is worked at all with SQLite is a weird fluke.
Link: https://github.com/encode/django-rest-framework/issues/5801
Edited to add, here's the reason for the "weird fluke", per the Django documentation:

When using an in-memory SQLite database to run the tests, the same database connection will be shared by two threads in parallel: the thread in which the live server is run and the thread in which the test case is run.

