Skip to content

Instantly share code, notes, and snippets.

@maiksprenger
Created September 25, 2014 14:42
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 maiksprenger/a57f0a5670a015ad152a to your computer and use it in GitHub Desktop.
Save maiksprenger/a57f0a5670a015ad152a to your computer and use it in GitHub Desktop.
def test_no_pending_changes(self):
output = cStringIO()
call_command('makemigrations', dry_run=True, stdout=output)
val = output.getvalue()
has_changes = 'No changes detected' not in output.getvalue()
if has_changes:
self.fail("Some apps need migrations: %s" % val)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment