Module Expr Str Assign NameStore Str Import alias Import alias Import alias Import alias Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias Import alias Import alias Import alias Import alias Import alias Import alias Assign NameStore Call NameLoad keyword Str keyword Str keyword Str keyword Num keyword Str keyword Str keyword Num keyword Str keyword Str keyword Str FunctionDef arguments args NameParam NameParam defaults body If Call NameLoad NameLoad NameLoad body Return BinOpMod Str TupleLoad NameLoad NameLoad orelse Return BinOpAdd NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad For NameStore Call NameLoad NameLoad body Assign NameStore Call NameLoad For NameStore Call AttributeLoad NameLoad attr body If CompareEq NameLoad Str body Assign SubscriptStore NameLoad Index NameLoad SubscriptLoad NameLoad Index NameLoad orelse Assign SubscriptStore NameLoad Index NameLoad Call NameLoad SubscriptLoad NameLoad Index NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr keyword Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Dict Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr CompareIsNot NameLoad NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str Assign NameStore Call AttributeLoad NameLoad attr keyword Str Assign NameStore Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Assign AttributeStore NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword Str keyword Num keyword Str Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword Str keyword Num keyword Str Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str While NameLoad body For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str Assign NameStore Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr keyword Str Assign NameStore Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword Str keyword Num keyword Str Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword Str keyword Num keyword Str Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword Str keyword Num keyword Str Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr keyword Str Assign NameStore Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num decorator_list decorator_list If CompareEq NameLoad Str body Expr Call AttributeLoad NameLoad attr
N/A N/A  Contains unit tests using search API.
 N/A __author__ tmatsuo@google.com (Takashi Matsuo), amyu@google.com (Amy Unruh) N/A os N/A shutil N/A tempfile N/A unittest N/A base64 N/A pickle google.appengine.api apiproxy_stub_map google.appengine.api files google.appengine.api queueinfo google.appengine.api search google.appengine.api users google.appengine.api.search simple_search_stub google.appengine.api.taskqueue taskqueue_stub google.appengine.ext db google.appengine.ext deferred google.appengine.ext testbed google.appengine.datastore datastore_stub_util N/A admin_handlers N/A config N/A docs N/A errors N/A models N/A utils N/A PRODUCT_PARAMS N/A dict pid testproduct name The adventures of Sherlock Holmes category books price 2000 publisher Baker Books title The adventures of Sherlock Holmes pages 200 author Sir Arthur Conan Doyle description The adventures of Sherlock Holmes isbn 123456 _add_mark N/A N/A v i N/A N/A N/A N/A isinstance v basestring N/A N/A N/A %s %s N/A v i N/A N/A N/A v i N/A create_test_data N/A N/A n N/A N/A N/A Create specified number of test data with marks added to its values. N/A ret N/A N/A i N/A xrange n N/A N/A params N/A dict N/A key N/A N/A PRODUCT_PARAMS keys N/A N/A N/A key category N/A N/A N/A params N/A key N/A PRODUCT_PARAMS N/A key N/A N/A N/A params N/A key N/A _add_mark N/A PRODUCT_PARAMS N/A key i N/A N/A N/A ret append params N/A ret N/A FTSTestCase N/A N/A unittest TestCase N/A setUp N/A N/A self N/A N/A N/A N/A self testbed N/A N/A testbed Testbed N/A N/A N/A N/A self testbed activate N/A N/A self policy N/A N/A datastore_stub_util PseudoRandomHRConsistencyPolicy probability 1 N/A N/A N/A N/A self testbed init_datastore_v3_stub consistency_policy N/A self policy N/A N/A N/A N/A self testbed init_memcache_stub N/A N/A N/A N/A self testbed init_taskqueue_stub N/A N/A N/A N/A apiproxy_stub_map apiproxy RegisterStub search N/A N/A simple_search_stub SearchServiceStub N/A tearDown N/A N/A self N/A N/A N/A N/A N/A N/A self testbed deactivate N/A testBuildProduct N/A N/A self N/A N/A N/A N/A N/A N/A models Category buildAllCategories N/A N/A N/A self assertRaises N/A errors Error N/A N/A docs Product buildProduct N/A N/A product N/A N/A N/A docs Product buildProduct PRODUCT_PARAMS N/A N/A N/A self assert_ N/A product None N/A N/A N/A self assertEqual N/A product price N/A PRODUCT_PARAMS N/A price N/A sq N/A N/A search Query query_string Sir Arthur Conan Doyle N/A res N/A N/A N/A N/A N/A docs Product getIndex search sq N/A N/A N/A self assertEqual N/A res number_found 1 N/A doc res N/A N/A N/A N/A self assertEqual N/A doc doc_id N/A product doc_id N/A testUpdateAverageRatingNonBatch1 N/A N/A self N/A N/A N/A Test non-batch mode avg ratings updating. N/A N/A N/A N/A models Category buildAllCategories N/A product N/A N/A N/A docs Product buildProduct PRODUCT_PARAMS N/A N/A N/A self assertEqual N/A product avg_rating 0 N/A N/A config BATCH_RATINGS_UPDATE False N/A review N/A N/A models Review product_key N/A product key username bob rating 4 comment comment N/A N/A N/A review put N/A N/A N/A utils updateAverageRating N/A review key N/A review N/A N/A models Review product_key N/A product key username bob2 rating 1 comment comment N/A N/A N/A review put N/A N/A N/A utils updateAverageRating N/A review key N/A product N/A N/A N/A models Product get_by_id N/A product pid N/A N/A N/A self assertEqual N/A product avg_rating 2.5 N/A taskq N/A N/A N/A self testbed get_stub N/A testbed TASKQUEUE_SERVICE_NAME N/A tasks N/A N/A taskq GetTasks default N/A N/A N/A taskq FlushQueue default N/A tasks N/A N/A task tasks N/A N/A N/A N/A deferred run N/A N/A base64 b64decode N/A task N/A body N/A tasks N/A N/A taskq GetTasks default N/A N/A N/A taskq FlushQueue default N/A sq N/A N/A search Query query_string ar:2.5 N/A res N/A N/A N/A N/A N/A docs Product getIndex search sq N/A N/A N/A self assertEqual N/A res number_found 1 N/A doc res N/A N/A N/A N/A self assertEqual N/A doc doc_id N/A product doc_id N/A testUpdateAverageRatingNonBatch2 N/A N/A self N/A N/A N/A Check the number of tasks added to the queue when reviews are created. N/A N/A N/A N/A models Category buildAllCategories N/A product N/A N/A N/A docs Product buildProduct PRODUCT_PARAMS N/A N/A config BATCH_RATINGS_UPDATE False N/A review N/A N/A models Review product_key N/A product key username bob rating 4 comment comment N/A N/A N/A review put N/A N/A N/A utils updateAverageRating N/A review key N/A review N/A N/A models Review product_key N/A product key username bob2 rating 1 comment comment N/A N/A N/A review put N/A N/A N/A utils updateAverageRating N/A review key N/A taskq N/A N/A N/A self testbed get_stub N/A testbed TASKQUEUE_SERVICE_NAME N/A tasks N/A N/A taskq GetTasks default N/A N/A N/A taskq FlushQueue default N/A N/A N/A self assertEqual N/A len tasks 2 N/A testUpdateAverageRatingBatch N/A N/A self N/A N/A N/A Test batch mode avg ratings updating. N/A N/A N/A N/A models Category buildAllCategories N/A product N/A N/A N/A docs Product buildProduct PRODUCT_PARAMS N/A N/A config BATCH_RATINGS_UPDATE True N/A review N/A N/A models Review product_key N/A product key username bob rating 5 comment comment N/A N/A N/A review put N/A N/A N/A utils updateAverageRating N/A review key N/A taskq N/A N/A N/A self testbed get_stub N/A testbed TASKQUEUE_SERVICE_NAME N/A tasks N/A N/A taskq GetTasks default N/A N/A N/A taskq FlushQueue default N/A N/A N/A self assertEqual N/A len tasks 0 N/A product N/A N/A N/A models Product get_by_id N/A product pid N/A sq N/A N/A search Query query_string ar:5.0 N/A res N/A N/A N/A N/A N/A docs Product getIndex search sq N/A N/A N/A self assertEqual N/A res number_found 0 N/A N/A N/A N/A __name__ __main__ N/A N/A N/A N/A unittest main