Skip to content

Instantly share code, notes, and snippets.

@benspaulding
Created March 18, 2015 17:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benspaulding/2c639f1326a416e09fbf to your computer and use it in GitHub Desktop.
Save benspaulding/2c639f1326a416e09fbf to your computer and use it in GitHub Desktop.
Skip migrations during Django tests
INSTALLED_APPS = (
# ...
)
# Skip migrations for tests
MIGRATION_MODULES = {
# Assumes that all values in INSTALLED_APPS are simply a package containing
# an application, not an application configuration class.
app.split('.').pop(): '{0}.migrations_not_used_in_tests'.format(app) for app in INSTALLED_APPS
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment