def patchClass(self, module, name, autospec=True, attach_as=None):
        if autospec:
            instance_mock = mock.Mock(spec_set=getattr(module, name))
        else:
            instance_mock = mock.Mock()

        f = self.useFixture(mockpatch.PatchObject(module, name,
                                                  autospec=autospec))
        class_mock = f.mock
        class_mock.return_value = instance_mock

        if attach_as is None:
            attach_class_as = name
            attach_instance_as = name.lower()
        else:
            attach_class_as = attach_as + '_class'
            attach_instance_as = attach_as

        self.master_mock.attach_mock(class_mock, attach_class_as)
        self.master_mock.attach_mock(instance_mock, attach_instance_as)
        return class_mock, instance_mock
Return the properties of the interface.
dataset/ETHPy150Open openstack/taskflow/taskflow/test.py/MockTestCase.patchClass--crossover with--dataset/ETHPy150Open openstack/bareon/contrib/ironic/ironic-fa-deploy/ironic_fa_deploy/modules/fuel_agent.py/FuelAgentDeploy.get_properties