How to simulate a broken database connection for testing in Django | Neil Kakkar Three different options for how to effectively test Django code accessing the database