Created
March 10, 2017 15:40
-
-
Save kezabelle/bb66e203f9f55b749b739ec4be77ac97 to your computer and use it in GitHub Desktop.
go away migrations during a pytest run. For my own recollection, but also for w0rp in #django IRC.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://simpleisbetterthancomplex.com/tips/2016/08/19/django-tip-12-disabling-migrations-to-speed-up-unit-tests.html | |
class DisableMigrations(object): | |
def __contains__(self, item): | |
return True | |
def __getitem__(self, item): | |
return 'notmigrations' | |
MIGRATION_MODULES = DisableMigrations() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment