tests: don't run migrations if environment has DISABLE_MIGRATIONS (#12889)
This commit is contained in:
parent
c0f49ca21b
commit
ab4a5cdb10
|
@ -22,3 +22,13 @@ TEMPLATE_VARS = {}
|
|||
|
||||
import tempfile
|
||||
MEDIA_ROOT = tempfile.mkdtemp('combo-test')
|
||||
|
||||
if 'DISABLE_MIGRATIONS' in os.environ:
|
||||
class DisableMigrations(object):
|
||||
def __contains__(self, item):
|
||||
return True
|
||||
|
||||
def __getitem__(self, item):
|
||||
return 'notmigrations'
|
||||
|
||||
MIGRATION_MODULES = DisableMigrations()
|
||||
|
|
Loading…
Reference in New Issue