From: ryan <ryanb+appeng...@google.com>
Date: Wed, 9 Apr 2008 16:17:42 -0700 (PDT)
Local: Wed, Apr 9 2008 7:17 pm
Subject: Re: Testing recommendations
Sure! Great question. Here's a snippet that will work with Python's
built-in unittest module. It should be easy to port to other unit test frameworks. (Note the overlap with the SetupStubs() method in google/ appengine/tools/dev_appserver.py in the SDK.) from google.appengine.api import apiproxy_stub_map
APP_ID = u'test_app'
class MyTest(unittest.TestCase):
def setUp(self):
# Start with a fresh api proxy.
# Use a fresh stub datastore.
# Use a fresh stub UserService.
# Use a fresh urlfetch stub.
# Use a fresh mail stub.
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||