• This repository has been archived on 27/Nov/2022
  • Stars
    star
    156
  • Rank 239,589 (Top 5 %)
  • Language
    Python
  • License
    MIT License
  • Created almost 10 years ago
  • Updated about 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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

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

Test Status Code Helth Latest PyPI version Number of PyPI downloads License

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',
)

You will want to make sure that test_without_migrations appears before any other apps in INSTALLED_APPS that provide a custom test management command.

In this case, you will also want to set the TEST_WITHOUT_MIGRATIONS_COMMAND setting:

TEST_WITHOUT_MIGRATIONS_COMMAND = 'django_nose.management.commands.test.Command'

This will ensure that you don't lose any additional functionality provided by your custom test management command.

Usage

Inform the flag --nomigrations when running your tests:

$ python manage.py test --nomigrations

Or use the alias -n:

$ python manage.py test -n

Version 0.6 also supports testserver command:

$ python manage.py testserver --nomigrations myfixture.json

Inspiration

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

Author

License

The MIT License.

More Repositories

1

itauscraper

Scraper para baixar seus extratos do Itaú com um comando.
Python
195
star
2

django-aggregate-if

Conditional aggregates for Django queries, just like the famous SumIf and CountIf in Excel.
Python
138
star
3

pacote-desafios-pythonicos

Pacote Desafios Pythônicos
Python
61
star
4

sqlformatter

SQLFormatter: Beautiful colored SQL staments for logging
Python
47
star
5

django-quickstart

Python
42
star
6

django-decouple

Strict separation of config from code.
Python
38
star
7

virtualenv-bootstrap

Python
35
star
8

gnucash-to-beancount

Gnucash to Beancount Converter.
Python
29
star
9

smallactsmanifesto

This is the source code for the SmallActsManifesto.org website
Python
25
star
10

slides-django-sem-trabalho

Slides da palestra "Trabalhando com Django para não ter trabalho" apresentada a PythonBrasil[8]
JavaScript
13
star
11

googlegroupexporter

GoogleGroup Exporter - Unlock your mailing list
HTML
13
star
12

the-matrix-rain

Python
12
star
13

django-fixturapp

Django-fixturapp is a set of management commands to use complex initial data sets from the great Fixture module.
Python
11
star
14

chipy8

A Chip8 emulator written in Python
Python
11
star
15

autonobot

Python
10
star
16

dojorio

The repository of the Coding Dojo group from Rio de Janeiro
9
star
17

inputao

Python
8
star
18

eventex

Sistema de Eventos encomendado pela Morena.
Python
8
star
19

xlsweb

Python
7
star
20

dgp-happy-numbers

Python
6
star
21

cadastro-alunos

Python
5
star
22

json2csv

Python
4
star
23

gridforme

Easy grid overlay for your perfect web design.
CSS
4
star
24

the-spreadsheet-quest

The Spreadsheet Quest
Python
4
star
25

tenjinserver

A tool to easy the template development process
Python
3
star
26

danp

3
star
27

apihack

Python
3
star
28

ipython-config

My iPython config files
Python
3
star
29

wp-restructuredtext

Use reStructuredText to write WordPress posts and pages.
PHP
3
star
30

autoword

Applescript Application for automation of filling invoice templates in Microsoft Word 2008
3
star
31

crosscompileruby

Just a simple script to cross compile ruby from a unix environment to windows
2
star
32

jetpack

Old collection of fabric scripts to deploy to a vhost. (discontinued)
Python
2
star
33

kata

Jupyter Notebook
1
star
34

qtxp

QT Experiments
Python
1
star
35

python-jsonstar

Extensible JSON module to serialize your all objects.
Python
1
star