Showing posts with label gae. Show all posts
Showing posts with label gae. Show all posts

Wednesday, 21 May 2008

Getting fresh datastore while testing GAE apps

If you want to find out how to test you GAE apps, check out these two URLs first:
http://groups.google.com/group/google-appengine/msg/9132b44026040498
http://farmdev.com/thoughts/45/testing-google-app-engine-sites/

I want to show you how to clear the datastore quickly (yep, only that :>):


from google.appengine.api import apiproxy_stub_map

def clear_datastore():
datastore = apiproxy_stub_map.apiproxy.GetStub('datastore_v3')
datastore.Clear()