'Establish a clean test environment'

def setUp(self):

    super(TestRegistryAPI, self).setUp()
    self.mapper = routes.Mapper()
    self.api = test_utils.FakeAuthMiddleware(rserver.API(self.mapper), is_admin=True)
    def _get_extra_fixture(id, name, **kwargs):
        return self.get_extra_fixture(id, name, locations=[{'url': ('file:///%s/%s' % (self.test_dir, id)), 'metadata': {}, 'status': 'active'}], **kwargs)
    self.FIXTURES = [_get_extra_fixture(UUID1, 'fake    image    #1', is_public=False, disk_format='ami', container_format='ami', min_disk=0, min_ram=0, owner=123, size=13, properties={'type': 'kernel'}), _get_extra_fixture(UUID2, 'fake    image    #2', min_disk=5, min_ram=256, size=19, properties={})]
    self.context = context.RequestContext(is_admin=True)
    db_api.get_engine()
    self.destroy_fixtures()
    self.create_fixtures()
