class FunctionalTest(Test):

    def get(self, *args, **kw):
        self.response = app.get(*args, **kw)

def post(self, *args, **kw):
    self.response = app.post(*args, **kw)

def assert_response(self, expected):
    pattern = str(expected) if re.search('^\\d+$', expected
        ) else '^\\d+ %s' % expected
assert re.search(pattern, self.response.status, re.IGNORECASE
    ), 'Response status was not "%s": %s' % (expected, self.response.status)

def assert_xpath(self, path, expected):
    element = ElementTree.fromstring(self.response.body)
found_nodes = element.findall('.' + path)
if type(expected) is int:
    assert_equal(expected, len(found_nodes))
elif type(expected) is str or type(expected) is str:
    assert True in [(node.text == expected) for node in found_nodes]
else:
    raise Exception('Unknown expected value: %r' % type(expected))
Как настроить процесс разработки TDD с помощью Google App Engine?