def testUpdateUserPhoto(self):
    episode_id, photo_id = self._UploadEpisodeWithPhoto()

    # Assign an asset key for user 1
    self._tester.UpdateUserPhoto(self._cookie, photo_id, asset_keys=['a/#asset-key-1'])

    # User 2 doesn't own the photo (and doesn't even have access to it!) but can still set asset keys.
    self._tester.UpdateUserPhoto(self._cookie2, photo_id, asset_keys=['a/#asset-key-2'])

    # User 2 can't read the episode yet.
    self.assertEqual([],
                     self._tester.QueryEpisodes(self._cookie2,
                                                [{'episode_id': episode_id, 'get_photos': True}])['episodes'])

    # Share the episode with user 2, and then try fetching the asset key
    vp_id, new_ep_ids = self._tester.ShareNew(self._cookie, [(episode_id, [photo_id])], [self._user2.user_id])
    self.assertEqual(sorted(self._GetAssetKeys(self._cookie2, new_ep_ids[0])), ['a/#asset-key-2'])
Verify that listing with parent_prefix returns match for 'foo'
dataset/ETHPy150Open viewfinderco/viewfinder/backend/www/test/update_user_photo_test.py/UpdateUserPhotoTestCase.testUpdateUserPhoto--crossover with--dataset/ETHPy150Open SpriteLink/NIPAP/tests/nipaptest.py/TestParentPrefix.test_parent_prefix