開発アプリケーション サーバーを使用して、Google App Engine の新しい全文検索機能を Python でテストしようとしています。
ローカルユニットテストsearch
でテストできるようにするためのスタブはありますか?testbed
以下は、例外をスローするコードの例です。
#!/usr/bin/python
from google.appengine.ext import testbed
from google.appengine.api import search
def foo():
d = search.Document(doc_id='X',
fields=[search.TextField(name='abc', value='123')])
s = search.Index(name='one').add(d)
tb = testbed.Testbed()
tb.activate()
# tb.init_search_stub() ## does this exist?
foo()
によってスローされる例外foo()
は:AssertionError: No api proxy found for service "search"
です。検索用の API プロキシは作成されていますか?
考えやコメントをお待ちしております。