Disable migrations when running your Django tests.
Project description
Django Test Without Migrations: Disable migrations when running your Django tests
Test Without Migrations is a manage.py test command extension.
The new Django 1.7 and 1.8 migration backend demands that you create a migration every time you change a model.
This can be inconvenient when you’re just trying to explore your models code.
In older Django versions, with South we could use the SOUTH_TEST_MIGRATIONS settings to tell Django to simply create all model tables without running migrations.
This app adds this capability to Django by extending the manage.py test command with a –nomigrations option.
Installation
Test Without Migrations works with Django 1.7+.
To install it, simply:
$ pip install django-test-without-migrations
Then add it to your INSTALLED_APPS on your settings.py:
INSTALLED_APPS = (
# ...
'test_without_migrations',
)
Usage
Inform the flag --nomigrations when running your tests:
$ python manage.py test --nomigrations
Or use the alias -n:
$ python manage.py test -n
Inspiration
This library was directly inspired by this solution: https://gist.github.com/NotSqrt/5f3c76cd15e40ef62d09
License
The MIT License.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Hashes for django-test-without-migrations-0.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b9601da1bfd63e20caba3cff598dae37c554567c98d2a610a6510aeccabd62dd |
|
MD5 | 9e74dec54dd00c06d03871f3b4fe3fec |
|
BLAKE2b-256 | 649e183f4cb85a0e3ec2e21099048234238c3291b2d96c0e52e31e6bfefd71f0 |