

@mock.patch.object(Operation, 'FAILPOINTS_ENABLED', True)
def testIdempotency(self):
    'Force op failure in order to test idempotency.'
    (ep_id, ph_ids) = self._UploadOneEpisode(self._cookie, 2)
    self._OldRemovePhotos(self._cookie, [(ep_id, ph_ids[:1])])
    self._OldRemovePhotos(self._cookie, [(ep_id, ph_ids)])
    (ep_id, ph_ids) = self._UploadOneEpisode(self._cookie, 2)
    (vp_id, new_ep_ids) = self._tester.ShareNew(self._cookie, [(ep_id, ph_ids)], [self._user2.user_id])
    self._OldRemovePhotos(self._cookie, [(new_ep_ids[0], ph_ids[1:])])
    self._OldRemovePhotos(self._cookie, [(new_ep_ids[0], ph_ids)])

dataset/ETHPy150Open viewfinderco/viewfinder/backend/www/test/old_remove_photos_test.py OldRemovePhotosTestCase.testIdempotency/original