I have a production database that contains a large set of data I want to use some data to run the unit test But to create the database, all the reasons for the beginning of the testing process take a very long time, which I would like to save.
I have created a test database using the manage.py investigator
command, then deleted all the data that I did not want to include through the administrator interface. How do I create a stability of data in the default test database?
You If you want to save stability from your testing, then just serialize your qs: dumpetta to generate Jason stability, like this:
./down.py dump diagram & gt; Fixture.json
#definfo Import your models from Core serializers import serialize qs1 = Model1.objects.filter (...) qs2 = Model2.objects.filter (...) ... fiction = 'sicalize' ('jason', list (qs1) + list (qs2) + F: f.write (stability)
Comments
Post a Comment