Skip to content

Instantly share code, notes, and snippets.

@dwickstrom
Created June 17, 2016 13:51
Show Gist options
  • Save dwickstrom/94671565f4458fa9867139d65ccf2bd0 to your computer and use it in GitHub Desktop.
Save dwickstrom/94671565f4458fa9867139d65ccf2bd0 to your computer and use it in GitHub Desktop.
no_db_testrunner.py
from django.test.runner import DiscoverRunner
class NoDbTestRunner(DiscoverRunner):
""" A test runner to test without database creation """
def setup_databases(self, **kwargs):
""" Override the database creation defined in parent class """
pass
def teardown_databases(self, old_config, **kwargs):
""" Override the database teardown defined in parent class """
pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment