在使用REST方法進行功能測試時,我們最終編寫了幫助程序調用以清除內部緩存並強制引擎與數據庫同步。
我還沒有用過gaetestbed,但是我原以爲你可以在測試之間flush the datastore?
"Use case: develop and test locally with real data
Restore to: your local development server.
Once you have restored the data to your local development server, I would highly suggest that you take a backup of your datastore.
You can find your datastore files in a temporary folder on your local machine (e.g., on my Mac, it's /var/folders/bz/bzDU030xHXK-jKYLMXnTzk+++TI/-Tmp-/). To find the folder on your own machine, flush the datastore (./manage.py flush) and you will see the path to your datastore folder printed in the resulting output."
來源
2010-12-06 05:54:22
Ben
謝謝尼克! – 2010-12-07 02:59:52