'Setup a test case environment.
Creates fake volume and snapshot objects and sets up the required
API responses.'

def setUp(self):

    super(TestDeleteSnapShot, self).setUp()
    ctx = context.RequestContext('fake', 'fake', auth_token=True)
    self.snapshot = fake_snapshot_obj(ctx, **{'provider_id': fake.SNAPSHOT_ID})
    self.snapshot_name_2x_enc = urllib.parse.quote(urllib.parse.quote(self.driver._id_to_base64(self.snapshot.id)))
    self.HTTPS_MOCK_RESPONSES = {self.RESPONSE_MODE.Valid: {('types/Volume/instances/getByName::' + self.snapshot_name_2x_enc): self.snapshot.id, 'instances/Volume::{}/action/removeMappedSdc'.format(self.snapshot.provider_id): self.snapshot.id, 'instances/Volume::{}/action/removeVolume'.format(self.snapshot.provider_id): self.snapshot.id}, self.RESPONSE_MODE.BadStatus: {('types/Volume/instances/getByName::' + self.snapshot_name_2x_enc): self.BAD_STATUS_RESPONSE, 'instances/Volume::{}/action/removeVolume'.format(self.snapshot.provider_id): self.BAD_STATUS_RESPONSE}, self.RESPONSE_MODE.Invalid: {('types/Volume/instances/getByName::' + self.snapshot_name_2x_enc): mocks.MockHTTPSResponse({'errorCode': self.OLD_VOLUME_NOT_FOUND_ERROR, 'message': 'Test    Delete    Invalid    Snapshot'}, 400), 'instances/Volume::{}/action/removeVolume'.format(self.snapshot.provider_id): mocks.MockHTTPSResponse({'errorCode': self.OLD_VOLUME_NOT_FOUND_ERROR, 'message': 'Test    Delete    Invalid    Snapshot'}, 400)}}
