On Wed, Feb 18, 2015 at 2:03 PM, Andrew Pinkham <m...@andrewsforge.com> wrote:
> I have an app in Django 1.7.4 that I would like to use purely for testing.
>
>     $ ./manage.py startapp override
>
> The app contains its own model, view, and URL pattern (the model overrides a 
> model in another app, allowing me to test behavior in a specific case).
>
> For the moment, I have the app in INSTALLED_APPS, and the tests run fine. 
> However, I would like to remove the app from INSTALLED_APPS, and override the 
> setting just for the tests. In theory:
>
>     @modify_settings(INSTALLED_APPS={'append': 'override'})
>
> However, if I then remove the string from project_name/settings.py, I am 
> given a Python Traceback which ends in:
>
>     django.db.utils.OperationalError: no such table: override_modelname
>
> How may I force the TestCase class to apply the migration file 
> override/migrations/0001_initial.py to the test database?
>
> Thanks,
> Andrew
>
> --
In the book "Two Scoops of Django" there is a section about setting up
different settings files.  That may help you out

http://twoscoopspress.org/pages/two-scoops-of-django-1-6-faq
-- 
Joel Goldstick
http://joelgoldstick.com

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAPM-O%2ByxF1%2BxJe%3D9eeCY-CJAKBjZH9vKzfBsYxrCfhyGPktWVQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to