You can define a custom test runner to do this. For example:
https://docs.djangoproject.com/en/dev/topics/testing/#django.test.simple.DjangoTestSuiteRunner.setup_databases
On Wed, Feb 8, 2012 at 7:42 AM, xina towner wrote:
> Yes, but django makes a new testDatabase and that's my problem, I want
I'm not sure that you can specify a different existing database. I think
(not certain) that Django's testing is built to have no effect on real
data, hence creating a blank test database. You can, however, use fixtures
to create data in the test database after it is created and before the unit
test
Yes, but django makes a new testDatabase and that's my problem, I want
django to use a database I've previously done.
On 8 February 2012 16:34, Mark Furbee wrote:
> Denis Darii already answered this on February 1st:
>
> "You can redefine your database connection by adding somewhere at the end
>
Denis Darii already answered this on February 1st:
"You can redefine your database connection by adding somewhere at the end
of your settings.py something like:
import sys
if 'test' in sys.argv:
DATABASES = ...
hope this helps."
Did you try this?
On Wed, Feb 8, 2012 at 7:19 AM, xina tow
4 matches
Mail list logo