Files
2012-02-21 01:15:00 -05:00

1 line
2.8 KiB
JSON

[{"user_id": 2571, "stars": [], "topic_id": 17262, "date_created": 1301949199.3462541, "message": "@bmelton we use 'flush' and 'loaddata' via call_command - the acceptance tests calls this code in the setup. but flush and loaddata is slow and has sometimes problems with foreign keys.", "group_id": 81, "id": 528709}, {"user_id": 2571, "stars": [], "topic_id": 17262, "date_created": 1301949242.8116779, "message": "So I am curious what others are using", "group_id": 81, "id": 528715}, {"user_id": 2571, "stars": [], "topic_id": 17262, "date_created": 1301948246.6896999, "message": "Is there a prefered way to reset the database of a django for acceptance testing?", "group_id": 81, "id": 528419}, {"user_id": 2571, "stars": [], "topic_id": 17262, "date_created": 1301948297.535861, "message": "eg something like this: https://gist.github.com/902310", "group_id": 81, "id": 528438}, {"user_id": 4077, "stars": [], "topic_id": 17262, "date_created": 1301948722.337594, "message": "Something like flush maybe? http://docs.djangoproject.com/en/dev/ref/django-admin/?from=olddocs#flush", "group_id": 81, "id": 528558}, {"user_id": 25337, "stars": [{"date_created": 1301960057.555511, "user_id": 2588}], "topic_id": 17262, "date_created": 1301953747.8349049, "message": "loaddata is more reliable if you us natural keys. However, I find fixtures fragile and difficult to maintain. I'd just write a management command to create your data in Python code. Or, if you've got a lot of data, a good old database backup is pretty good :)", "group_id": 81, "id": 529731}, {"user_id": 4077, "stars": [], "topic_id": 17262, "date_created": 1301952372.28686, "message": "I generally use Flush, on the rare occasion that it doesn't work, I just truncate the tables and reload via fixtures.", "group_id": 81, "id": 529438}, {"user_id": 2588, "stars": [], "topic_id": 17262, "date_created": 1301960414.1150551, "message": "One thing to be aware of with truncating tables is that auto-increment counters may or may not be reset with that operation depending on your DB/engine/version.", "group_id": 81, "id": 530610}, {"user_id": 26888, "stars": [], "topic_id": 17262, "date_created": 1301982943.4394121, "message": "I use fixtures. Not that easy to maintain but it is ok for now. Acceptance tests are slow and not supposed to be run on every commit as unit test should be for example.", "group_id": 81, "id": 535960}, {"user_id": 24006, "stars": [{"date_created": 1302092117.872323, "user_id": 5778}], "topic_id": 17262, "date_created": 1301990971.660938, "message": "I usually use https://github.com/kmmbvnr/django-any and it's very useful instead of fixtures", "group_id": 81, "id": 538423}, {"user_id": 2571, "stars": [], "topic_id": 17262, "date_created": 1302031710.4050021, "message": "@andrew_makhnach Thank you for the pointer!!", "group_id": 81, "id": 545188}]