django-test-without-migrations-0.6/0000755000076600000240000000000013073522045020416 5ustar henriquestaff00000000000000django-test-without-migrations-0.6/django_test_without_migrations.egg-info/0000755000076600000240000000000013073522045030430 5ustar henriquestaff00000000000000django-test-without-migrations-0.6/django_test_without_migrations.egg-info/dependency_links.txt0000644000076600000240000000000113073522045034476 0ustar henriquestaff00000000000000 django-test-without-migrations-0.6/django_test_without_migrations.egg-info/PKG-INFO0000644000076600000240000001115613073522045031531 0ustar henriquestaff00000000000000Metadata-Version: 1.1 Name: django-test-without-migrations Version: 0.6 Summary: Disable migrations when running your Django tests. Home-page: http://github.com/henriquebastos/django-test-without-migrations/ Author: Henrique Bastos Author-email: henrique@bastos.net License: MIT Description: Django Test Without Migrations: Disable migrations when running your Django tests ================================================================================= .. image:: https://img.shields.io/travis/henriquebastos/django-test-without-migrations.svg :target: https://travis-ci.org/henriquebastos/django-test-without-migrations :alt: Test Status .. image:: https://landscape.io/github/henriquebastos/django-test-without-migrations/master/landscape.png :target: https://landscape.io/github/henriquebastos/django-test-without-migrations/master :alt: Code Helth .. image:: https://img.shields.io/pypi/v/django-test-without-migrations.svg :target: https://pypi.python.org/pypi/django-test-without-migrations/ :alt: Latest PyPI version .. image:: https://img.shields.io/pypi/dm/django-test-without-migrations.svg :target: https://pypi.python.org/pypi/django-test-without-migrations/ :alt: Number of PyPI downloads .. image:: https://img.shields.io/github/license/henriquebastos/django-test-without-migrations.svg :target: https://pypi.python.org/pypi/django-test-without-migrations/ :alt: 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: .. code-block:: bash $ pip install django-test-without-migrations Then add it to your `INSTALLED_APPS` on your `settings.py`: .. code-block:: python 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: .. code-block:: python 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: .. code-block:: bash $ python manage.py test --nomigrations Or use the alias ``-n``: .. code-block:: bash $ python manage.py test -n Version 0.6 also supports `testserver` command: .. code-block:: bash $ python manage.py testserver --nomigrations myfixture.json Inspiration ----------- This library was directly inspired by this solution: https://gist.github.com/NotSqrt/5f3c76cd15e40ef62d09 Author ------ * `Henrique Bastos `_ License ======= The MIT License. Platform: any Classifier: Development Status :: 5 - Production/Stable Classifier: Framework :: Django Classifier: Intended Audience :: Developers Classifier: License :: OSI Approved :: MIT License Classifier: Natural Language :: English Classifier: Operating System :: OS Independent Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: 2.7 Classifier: Programming Language :: Python :: 3 Classifier: Topic :: Software Development :: Libraries django-test-without-migrations-0.6/django_test_without_migrations.egg-info/SOURCES.txt0000644000076600000240000000112413073522045032312 0ustar henriquestaff00000000000000README.rst setup.cfg setup.py django_test_without_migrations.egg-info/PKG-INFO django_test_without_migrations.egg-info/SOURCES.txt django_test_without_migrations.egg-info/dependency_links.txt django_test_without_migrations.egg-info/top_level.txt django_test_without_migrations.egg-info/zip-safe test_without_migrations/__init__.py test_without_migrations/management/__init__.py test_without_migrations/management/commands/__init__.py test_without_migrations/management/commands/_base.py test_without_migrations/management/commands/test.py test_without_migrations/management/commands/testserver.pydjango-test-without-migrations-0.6/django_test_without_migrations.egg-info/top_level.txt0000644000076600000240000000003013073522045033153 0ustar henriquestaff00000000000000test_without_migrations django-test-without-migrations-0.6/django_test_without_migrations.egg-info/zip-safe0000644000076600000240000000000113073522045032060 0ustar henriquestaff00000000000000 django-test-without-migrations-0.6/PKG-INFO0000644000076600000240000001115613073522045021517 0ustar henriquestaff00000000000000Metadata-Version: 1.1 Name: django-test-without-migrations Version: 0.6 Summary: Disable migrations when running your Django tests. Home-page: http://github.com/henriquebastos/django-test-without-migrations/ Author: Henrique Bastos Author-email: henrique@bastos.net License: MIT Description: Django Test Without Migrations: Disable migrations when running your Django tests ================================================================================= .. image:: https://img.shields.io/travis/henriquebastos/django-test-without-migrations.svg :target: https://travis-ci.org/henriquebastos/django-test-without-migrations :alt: Test Status .. image:: https://landscape.io/github/henriquebastos/django-test-without-migrations/master/landscape.png :target: https://landscape.io/github/henriquebastos/django-test-without-migrations/master :alt: Code Helth .. image:: https://img.shields.io/pypi/v/django-test-without-migrations.svg :target: https://pypi.python.org/pypi/django-test-without-migrations/ :alt: Latest PyPI version .. image:: https://img.shields.io/pypi/dm/django-test-without-migrations.svg :target: https://pypi.python.org/pypi/django-test-without-migrations/ :alt: Number of PyPI downloads .. image:: https://img.shields.io/github/license/henriquebastos/django-test-without-migrations.svg :target: https://pypi.python.org/pypi/django-test-without-migrations/ :alt: 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: .. code-block:: bash $ pip install django-test-without-migrations Then add it to your `INSTALLED_APPS` on your `settings.py`: .. code-block:: python 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: .. code-block:: python 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: .. code-block:: bash $ python manage.py test --nomigrations Or use the alias ``-n``: .. code-block:: bash $ python manage.py test -n Version 0.6 also supports `testserver` command: .. code-block:: bash $ python manage.py testserver --nomigrations myfixture.json Inspiration ----------- This library was directly inspired by this solution: https://gist.github.com/NotSqrt/5f3c76cd15e40ef62d09 Author ------ * `Henrique Bastos `_ License ======= The MIT License. Platform: any Classifier: Development Status :: 5 - Production/Stable Classifier: Framework :: Django Classifier: Intended Audience :: Developers Classifier: License :: OSI Approved :: MIT License Classifier: Natural Language :: English Classifier: Operating System :: OS Independent Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: 2.7 Classifier: Programming Language :: Python :: 3 Classifier: Topic :: Software Development :: Libraries django-test-without-migrations-0.6/README.rst0000644000076600000240000000604113073515655022117 0ustar henriquestaff00000000000000Django Test Without Migrations: Disable migrations when running your Django tests ================================================================================= .. image:: https://img.shields.io/travis/henriquebastos/django-test-without-migrations.svg :target: https://travis-ci.org/henriquebastos/django-test-without-migrations :alt: Test Status .. image:: https://landscape.io/github/henriquebastos/django-test-without-migrations/master/landscape.png :target: https://landscape.io/github/henriquebastos/django-test-without-migrations/master :alt: Code Helth .. image:: https://img.shields.io/pypi/v/django-test-without-migrations.svg :target: https://pypi.python.org/pypi/django-test-without-migrations/ :alt: Latest PyPI version .. image:: https://img.shields.io/pypi/dm/django-test-without-migrations.svg :target: https://pypi.python.org/pypi/django-test-without-migrations/ :alt: Number of PyPI downloads .. image:: https://img.shields.io/github/license/henriquebastos/django-test-without-migrations.svg :target: https://pypi.python.org/pypi/django-test-without-migrations/ :alt: 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: .. code-block:: bash $ pip install django-test-without-migrations Then add it to your `INSTALLED_APPS` on your `settings.py`: .. code-block:: python 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: .. code-block:: python 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: .. code-block:: bash $ python manage.py test --nomigrations Or use the alias ``-n``: .. code-block:: bash $ python manage.py test -n Version 0.6 also supports `testserver` command: .. code-block:: bash $ python manage.py testserver --nomigrations myfixture.json Inspiration ----------- This library was directly inspired by this solution: https://gist.github.com/NotSqrt/5f3c76cd15e40ef62d09 Author ------ * `Henrique Bastos `_ License ======= The MIT License. django-test-without-migrations-0.6/setup.cfg0000644000076600000240000000010313073522045022231 0ustar henriquestaff00000000000000[bdist_wheel] universal = 1 [egg_info] tag_build = tag_date = 0 django-test-without-migrations-0.6/setup.py0000644000076600000240000000232413073515373022137 0ustar henriquestaff00000000000000# coding: utf-8 from setuptools import setup import os setup(name='django-test-without-migrations', version='0.6', description='Disable migrations when running your Django tests.', long_description=open(os.path.join(os.path.dirname(__file__), "README.rst")).read(), author="Henrique Bastos", author_email="henrique@bastos.net", license="MIT", packages=[ 'test_without_migrations', 'test_without_migrations.management', 'test_without_migrations.management.commands', ], install_requires=[], zip_safe=True, platforms='any', include_package_data=True, classifiers=[ 'Development Status :: 5 - Production/Stable', 'Framework :: Django', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Natural Language :: English', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Topic :: Software Development :: Libraries', ], url='http://github.com/henriquebastos/django-test-without-migrations/', ) django-test-without-migrations-0.6/test_without_migrations/0000755000076600000240000000000013073522045025414 5ustar henriquestaff00000000000000django-test-without-migrations-0.6/test_without_migrations/__init__.py0000644000076600000240000000002013073454760027525 0ustar henriquestaff00000000000000# coding: utf-8 django-test-without-migrations-0.6/test_without_migrations/management/0000755000076600000240000000000013073522045027530 5ustar henriquestaff00000000000000django-test-without-migrations-0.6/test_without_migrations/management/__init__.py0000644000076600000240000000002013073454760031641 0ustar henriquestaff00000000000000# coding: utf-8 django-test-without-migrations-0.6/test_without_migrations/management/commands/0000755000076600000240000000000013073522045031331 5ustar henriquestaff00000000000000django-test-without-migrations-0.6/test_without_migrations/management/commands/__init__.py0000644000076600000240000000002013073454760033442 0ustar henriquestaff00000000000000# coding: utf-8 django-test-without-migrations-0.6/test_without_migrations/management/commands/_base.py0000644000076600000240000000425313073521423032757 0ustar henriquestaff00000000000000import optparse import sys from django import VERSION as DJANGO_VERSION from django.conf import settings from django.utils.module_loading import import_string HELP = 'Tells Django to NOT use migrations and create all tables directly.' TestCommand = import_string(getattr( settings, 'TEST_WITHOUT_MIGRATIONS_COMMAND', 'django.core.management.commands.test.Command')) # testserver command only exists on Django 1.10+ if DJANGO_VERSION >= (1, 10): TestServerCommand = import_string( 'django.core.management.commands.testserver.Command' ) else: TestServerCommand = TestCommand class DisableMigrations(object): def __contains__(self, item): return True def __getitem__(self, item): # django 1.9 takes None, 1.7/8 has an error here, so use a dummy value # 1.11+ always actually imports the module, so we can't use the dummy there if DJANGO_VERSION < (1, 9): return 'notmigrations' else: return None class CommandMixin(object): def __init__(self): super(CommandMixin, self).__init__() # Optparse was deprecated on 1.8 # So we only define option_list for Django 1.7 if DJANGO_VERSION < (1, 8): self.option_list = super(CommandMixin, self).option_list + ( optparse.make_option( '-n', '--nomigrations', action='store_true', dest='nomigrations', default=False, help=HELP), ) def add_arguments(self, parser): # New API on Django 1.8 super(CommandMixin, self).add_arguments(parser) parser.add_argument( '-n', '--nomigrations', action='store_true', dest='nomigrations', default=False, help=HELP) def handle(self, *test_labels, **options): for arg in ('-n', '--nomigrations'): if arg in sys.argv: sys.argv.remove(arg) if options['nomigrations']: settings.MIGRATION_MODULES = DisableMigrations() super(CommandMixin, self).handle(*test_labels, **options) django-test-without-migrations-0.6/test_without_migrations/management/commands/test.py0000644000076600000240000000021513073515576032673 0ustar henriquestaff00000000000000from test_without_migrations.management.commands._base import CommandMixin, TestCommand class Command(CommandMixin, TestCommand): pass django-test-without-migrations-0.6/test_without_migrations/management/commands/testserver.py0000644000076600000240000000023113073521434034106 0ustar henriquestaff00000000000000from test_without_migrations.management.commands._base import CommandMixin, TestServerCommand class Command(CommandMixin, TestServerCommand): pass