Skip to main content

Disable migrations when running your Django tests.

Project description

Django Test Without Migrations: Disable migrations when running your Django tests

Test Status Code Helth Latest PyPI version Number of PyPI downloads

Test Without Migrations is a manage.py test command extension.

The new Django 1.7 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

Inspiration

This library was directly inspired by this solution: https://gist.github.com/NotSqrt/5f3c76cd15e40ef62d09

Author

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

django-test-without-migrations-0.1.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_test_without_migrations-0.1-py2.py3-none-any.whl (5.5 kB view details)

Uploaded Python 2Python 3

File details

Details for the file django-test-without-migrations-0.1.tar.gz.

File metadata

File hashes

Hashes for django-test-without-migrations-0.1.tar.gz
Algorithm Hash digest
SHA256 a6368125f1ee4cb6c25a69dd3b8a22225fd3c0bfacf5215e39529d157137d7c0
MD5 b431e2e6217412c06a5026028fbb20e8
BLAKE2b-256 f9f792375b39e3c17f6ee91a47d856f907c21a22e2aaf1cdb5163c9974461d61

See more details on using hashes here.

File details

Details for the file django_test_without_migrations-0.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for django_test_without_migrations-0.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 cb69f0663fe30fdadf0628174b8c441d68a36e9dbdcd416a1400137ed6e75e06
MD5 9a6aa1d275a2a31dfccd9a219bf8221f
BLAKE2b-256 6fc52000514dcc7f58e772e30e62b09724c30d23d042307f8462c411d13c0ff2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page