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

def setUp(self):

    super(TestCreateVolume, self).setUp()
    ctx = context.RequestContext('fake', 'fake', auth_token=True)
    self.volume = fake_volume.fake_volume_obj(ctx)
    host = 'host@backend#{}:{}'.format(self.PROT_DOMAIN_NAME, self.STORAGE_POOL_NAME)
    self.volume.host = host
    self.HTTPS_MOCK_RESPONSES = {self.RESPONSE_MODE.Valid: {('types/Volume/instances/getByName::' + self.volume.name): '"{}"'.format(self.volume.id), 'types/Volume/instances': {'id': self.volume.id}, ('types/Domain/instances/getByName::' + self.PROT_DOMAIN_NAME): '"{}"'.format(self.PROT_DOMAIN_ID), 'types/Pool/instances/getByName::{},{}'.format(self.PROT_DOMAIN_ID, self.STORAGE_POOL_NAME): '"{}"'.format(self.STORAGE_POOL_ID)}, self.RESPONSE_MODE.Invalid: {('types/Domain/instances/getByName::' + self.PROT_DOMAIN_NAME): None, 'types/Pool/instances/getByName::{},{}'.format(self.PROT_DOMAIN_ID, self.STORAGE_POOL_NAME): None}, self.RESPONSE_MODE.BadStatus: {'types/Volume/instances': self.BAD_STATUS_RESPONSE, ('types/Domain/instances/getByName::' + self.PROT_DOMAIN_NAME): self.BAD_STATUS_RESPONSE, 'types/Pool/instances/getByName::{},{}'.format(self.PROT_DOMAIN_ID, self.STORAGE_POOL_NAME): self.BAD_STATUS_RESPONSE}}
