First time here? Check out the FAQ!

Revision history  [back]

django : dumpdata of database after tests with --keepdb

Hello I have a test script in my django project which creates some data in the test database. I launch the test using the green arrow and a launch configuration test --keepdb. The test terminates OK and displays 'Preserving testdatabase for alias default.'

Then I launch another configuration which contains the command dumpdata -o --database

The intention is to save the test database into a fixture so as to use it for other tests. I get the following error message :

CommandError: Unable to serialize database: The connection 'test_djangoLudd21' doesn't exist.

What am I doing wrong?

Revision 1

django : dumpdata of database after tests with --keepdb

Hello I have a test script in my django project which creates some data in the test database. I launch the test using the green arrow and a launch configuration test --keepdb. The test terminates OK and displays 'Preserving testdatabase for alias default.'

Then I launch another configuration which contains the command dumpdata -o --database

The intention is to save the test database into a fixture so as to use it for other tests. I get the following error message :

CommandError: Unable to serialize database: The connection 'test_djangoLudd21' doesn't exist.

What am I doing wrong?