Module Expr Str Assign NameStore Str Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body Expr Str Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr ListLoad TupleLoad NameLoad SubscriptLoad NameLoad Slice Num Assign TupleStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr ListLoad TupleLoad NameLoad SubscriptLoad NameLoad Slice Num Num ListLoad AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr ListLoad TupleLoad SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Slice Num Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Assign TupleStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr NameLoad ListLoad AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore ListComp TupleLoad NameLoad SubscriptLoad NameLoad Slice Num comprehension TupleStore NameStore TupleStore NameStore NameStore SubscriptLoad Call NameLoad NameLoad NameLoad Slice Num Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr BinOpAdd SubscriptLoad NameLoad Slice Num NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr ListLoad TupleLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr ListLoad TupleLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr ListLoad TupleLoad NameLoad BinOpAdd NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr ListLoad TupleLoad NameLoad SubscriptLoad NameLoad Slice Num Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr ListLoad TupleLoad NameLoad NameLoad Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Assign TupleStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr ListLoad TupleLoad NameLoad NameLoad ListLoad AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr ListLoad TupleLoad SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Slice Num Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr ListLoad TupleLoad SubscriptLoad NameLoad Index Num NameLoad decorator_list Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str NameLoad FunctionDef arguments args NameParam defaults body Expr Str Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Num AttributeLoad NameLoad attr AttributeLoad NameLoad attr ListLoad TupleLoad NameLoad ListLoad Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Num AttributeLoad NameLoad attr AttributeLoad NameLoad attr ListLoad TupleLoad Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Num AttributeLoad NameLoad attr AttributeLoad NameLoad attr ListLoad TupleLoad NameLoad NameLoad Assign TupleStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr ListLoad TupleLoad NameLoad NameLoad ListLoad AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Num AttributeLoad NameLoad attr AttributeLoad NameLoad attr ListLoad TupleLoad SubscriptLoad NameLoad Index Num NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Dict Str ListComp Dict Str Str NameLoad NameLoad comprehension TupleStore NameStore NameStore NameLoad Expr Call NameLoad AttributeLoad NameLoad attr NameLoad NameLoad decorator_list decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad NameLoad keyword AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Assign NameStore ListLoad Assign NameStore ListLoad For NameStore SubscriptLoad NameLoad Index Str body Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad If CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad For NameStore SubscriptLoad NameLoad Index Str body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Call NameLoad NameLoad NameLoad If UnaryOpNot Call AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad keyword Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr attr ListLoad AttributeLoad NameLoad attr orelse Expr Call AttributeLoad NameLoad attr NameLoad For NameStore SubscriptLoad NameLoad Index Str body Assign NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Call NameLoad NameLoad NameLoad keyword NameLoad Assign NameStore IfExp CompareIs NameLoad NameLoad SubscriptLoad NameLoad Index Str AttributeLoad NameLoad attr Assign NameStore IfExp CompareIs NameLoad NameLoad ListLoad AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr ListLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad If CompareGt Call NameLoad NameLoad Num body Assign NameStore Dict Str ListComp Dict Str Str SubscriptLoad NameLoad Index Str NameLoad comprehension NameStore NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad NameLoad NameLoad Assign NameStore Dict Str ListComp Dict Str Str SubscriptLoad NameLoad Index Str NameLoad comprehension NameStore NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str NameLoad NameLoad Dict NameLoad Return NameLoad decorator_list
N/A N/A Tests remove_photos method as an old client.
 N/A __author__ andy@emailscrubbed.com (Andy Kimball) N/A mock N/A time copy deepcopy functools partial viewfinder.backend.base message util viewfinder.backend.base.testing async_test viewfinder.backend.db.accounting Accounting viewfinder.backend.db.db_client DBKey viewfinder.backend.db.episode Episode viewfinder.backend.db.operation Operation viewfinder.backend.db.photo Photo viewfinder.backend.db.post Post viewfinder.backend.db.user User viewfinder.backend.db.user_post UserPost viewfinder.backend.www.test service_base_test OldRemovePhotosTestCase N/A N/A service_base_test ServiceBaseTestCase N/A testRemovePhotos N/A N/A self N/A N/A N/A Remove photos from default and shared viewpoints. N/A N/A ep_id ph_ids N/A N/A self _UploadOneEpisode N/A self _cookie 9 N/A N/A N/A self _OldRemovePhotos N/A self _cookie N/A N/A ep_id N/A ph_ids N/A 2 N/A N/A vp_id new_ep_ids N/A N/A N/A self _tester ShareNew N/A self _cookie N/A N/A ep_id N/A ph_ids N/A 1 2 N/A N/A N/A self _user2 user_id N/A N/A N/A self _OldRemovePhotos N/A self _cookie N/A N/A N/A new_ep_ids N/A 0 N/A ph_ids N/A 1 2 N/A testRemoveMultipleEpisodes N/A N/A self N/A N/A N/A Remove photos from multiple episodes. N/A ep_ph_ids_list N/A N/A self _UploadMultipleEpisodes N/A self _cookie 17 N/A N/A vp_id new_ep_ids N/A N/A N/A self _tester ShareNew N/A self _cookie ep_ph_ids_list N/A N/A N/A self _user3 user_id N/A ep_ph_ids_list2 N/A N/A new_ep_id N/A ph_ids N/A 3 N/A N/A new_ep_id N/A old_ep_id ph_ids N/A N/A zip new_ep_ids ep_ph_ids_list N/A 2 N/A N/A N/A self _OldRemovePhotos N/A self _cookie N/A N/A ep_ph_ids_list N/A 3 ep_ph_ids_list2 N/A testRemoveDuplicatePhotos N/A N/A self N/A N/A N/A Remove the same photos multiple times. N/A N/A ep_id ph_ids N/A N/A self _UploadOneEpisode N/A self _cookie 3 N/A N/A N/A self _OldRemovePhotos N/A self _cookie N/A N/A ep_id ph_ids N/A N/A N/A self _OldRemovePhotos N/A self _cookie N/A N/A ep_id ph_ids N/A N/A N/A self _OldRemovePhotos N/A self _cookie N/A N/A ep_id N/A ph_ids ph_ids N/A testIdempotency N/A N/A self N/A N/A N/A Force op failure in order to test idempotency. N/A N/A ep_id ph_ids N/A N/A self _UploadOneEpisode N/A self _cookie 2 N/A N/A N/A self _OldRemovePhotos N/A self _cookie N/A N/A ep_id N/A ph_ids N/A 1 N/A N/A N/A self _OldRemovePhotos N/A self _cookie N/A N/A ep_id ph_ids N/A N/A ep_id ph_ids N/A N/A self _UploadOneEpisode N/A self _cookie 2 N/A N/A vp_id new_ep_ids N/A N/A N/A self _tester ShareNew N/A self _cookie N/A N/A ep_id ph_ids N/A N/A N/A self _user2 user_id N/A N/A N/A self _OldRemovePhotos N/A self _cookie N/A N/A N/A new_ep_ids N/A 0 N/A ph_ids N/A 1 N/A N/A N/A self _OldRemovePhotos N/A self _cookie N/A N/A N/A new_ep_ids N/A 0 ph_ids N/A N/A N/A N/A mock patch object Operation FAILPOINTS_ENABLED True testRemoveNonExistingPhoto N/A N/A self N/A N/A N/A ERROR: Remove from an episode without a POST entry. N/A N/A ep_id ph_ids N/A N/A self _UploadOneEpisode N/A self _cookie 3 N/A N/A N/A self assertRaisesHttpError 400 N/A self _OldRemovePhotos N/A self _cookie N/A N/A ep_id N/A punknown N/A testRemoveFromNonExistingEpisode N/A N/A self N/A N/A N/A ERROR: Remove from a non-existing episode. N/A N/A ep_id ph_ids N/A N/A self _UploadOneEpisode N/A self _cookie 3 N/A N/A N/A self assertRaisesHttpError 400 N/A self _OldRemovePhotos N/A self _cookie N/A N/A eunknown ph_ids N/A testRemovePhotosAccess N/A N/A self N/A N/A N/A ERROR: Ensure that only photos visible to the user can be removed. N/A N/A ep_id ph_ids N/A N/A self _UploadOneEpisode N/A self _cookie 1 N/A N/A N/A self assertRaisesHttpError 403 N/A self _OldRemovePhotos N/A self _cookie2 N/A N/A ep_id ph_ids N/A N/A vp_id new_ep_ids N/A N/A N/A self _tester ShareNew N/A self _cookie N/A N/A ep_id ph_ids N/A N/A N/A self _user2 user_id N/A N/A N/A self assertRaisesHttpError 403 N/A self _OldRemovePhotos N/A self _cookie3 N/A N/A N/A new_ep_ids N/A 0 ph_ids N/A _OldRemovePhotos N/A N/A self user_cookie ep_ph_ids_list N/A N/A N/A remove_photos: Removes photos from a user's personal library in older clients.

    "ep_ph_ids_list" is a list of tuples in this format:
      [(episode, [photo_id, ...]), ...]
     N/A request_dict N/A episodes N/A N/A episode_id photo_ids episode_id photo_ids N/A N/A episode_id photo_ids ep_ph_ids_list N/A N/A _TestOldRemovePhotos N/A self _tester user_cookie request_dict N/A N/A _TestOldRemovePhotos N/A N/A tester user_cookie request_dict N/A N/A N/A Called by the ServiceTester in order to test remove_photos service API call. N/A validator N/A tester validator N/A N/A user_id device_id N/A N/A tester GetIdsFromCookie user_cookie N/A request_dict N/A deepcopy request_dict N/A user N/A N/A validator GetModelObject User user_id N/A actual_dict N/A N/A tester SendRequest remove_photos user_cookie request_dict version N/A N/A message Message SUPPORT_MULTIPLE_IDENTITIES_PER_CONTACT N/A op_dict N/A N/A tester _DeriveNotificationOpDict user_id device_id request_dict N/A remove_ep_dicts N/A N/A hide_ep_dicts N/A N/A request_ep N/A request_dict N/A episodes N/A N/A episode_id N/A request_ep N/A episode_id N/A episode N/A N/A validator GetModelObject Episode episode_id N/A N/A N/A episode viewpoint_id N/A user private_vp_id N/A N/A N/A N/A remove_ep_dicts append request_ep N/A photo_id N/A request_ep N/A photo_ids N/A N/A post N/A N/A validator GetModelObject Post N/A DBKey episode_id photo_id N/A N/A N/A N/A post IsRemoved N/A N/A N/A N/A validator ValidateUpdateDBObject Post episode_id episode_id photo_id photo_id labels N/A N/A N/A N/A N/A post labels combine union N/A N/A Post REMOVED N/A N/A N/A N/A hide_ep_dicts append request_ep N/A photo_id N/A request_ep N/A photo_ids N/A N/A found_hide True N/A post_id N/A N/A Post ConstructPostId episode_id photo_id N/A user_post N/A N/A validator GetModelObject UserPost N/A DBKey user_id post_id must_exist False N/A timestamp N/A N/A user_post None N/A op_dict N/A op_timestamp N/A user_post timestamp N/A labels N/A N/A user_post None N/A N/A UserPost HIDDEN N/A N/A N/A user_post labels union N/A N/A UserPost HIDDEN N/A N/A N/A validator ValidateUpdateDBObject UserPost user_id user_id post_id post_id timestamp timestamp labels labels N/A N/A N/A len hide_ep_dicts 0 N/A N/A invalidate N/A episodes N/A N/A episode_id get_photos N/A request_ep N/A episode_id True N/A request_ep hide_ep_dicts N/A N/A N/A validator ValidateNotification hide_photos user_id op_dict invalidate N/A invalidate N/A episodes N/A N/A episode_id get_photos N/A request_ep N/A episode_id True N/A request_ep remove_ep_dicts N/A N/A N/A validator ValidateNotification remove_photos user_id op_dict invalidate N/A N/A N/A validator ValidateViewpointAccounting N/A user private_vp_id N/A N/A N/A tester _CompareResponseDicts remove_photos user_id request_dict N/A actual_dict N/A actual_dict N/A