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?
Comments
Does this work outside of Wing? If so, take a look at the different in os.environ in each case, in case something else needs to be set in Environment in Wing's Project Properties. I can't speak to whether you're using Django incorrectly since I don't have a lot of experience with it.
Unfortunately I get the same behavoir outside of wing.