def make_iblockdeviceapi_tests(
        blockdevice_api_factory,
        unknown_blockdevice_id_factory,
        minimum_allocatable_size=None,
        device_allocation_unit=None,
):
    if minimum_allocatable_size is None:
        minimum_allocatable_size = get_minimum_allocatable_size()
    if device_allocation_unit is None:
        device_allocation_unit = int(
            environ.get('FLOCKER_FUNCTIONAL_TEST_DEVICE_ALLOCATION_UNIT', 1)
        )

    class Tests(IBlockDeviceAPITestsMixin, TestCase):
        def setUp(self):
            super(Tests, self).setUp()
            self.api = blockdevice_api_factory(test_case=self)
            self.unknown_blockdevice_id = unknown_blockdevice_id_factory(self)
            check_allocatable_size(
                self.api.allocation_unit(),
                minimum_allocatable_size
            )
            self.minimum_allocatable_size = minimum_allocatable_size
            self.device_allocation_unit = device_allocation_unit
            self.this_node = self.api.compute_instance_id()

    return Tests
:param blockdevice_api_factory: A factory which will be called
dataset/ETHPy150Open ClusterHQ/flocker/flocker/node/agents/testtools/_blockdevice.py/make_iblockdeviceapi_tests