def testConstructionWith84Data(self, mock_create_from_file): mock_create_from_file.return_value = self.proc84_info inst = drbd.DRBD8Dev(self.test_unique_id, [], 123, {}, self.test_dyn_params) self.assertEqual(inst._show_info_cls, drbd_info.DRBD84ShowInfo) self.assertTrue( isinstance(inst._cmd_gen, drbd_cmdgen.DRBD84CmdGenerator))
def testCreate(self, proc_info, check_meta_size, init_meta): proc_info.return_value = self.proc84_info check_meta_size.return_value = None init_meta.return_value = None self.test_dyn_params[constants.DDP_LOCAL_MINOR] = 2 expected = drbd.DRBD8Dev(self.test_unique_id, [], 123, {}, self.test_dyn_params) got = drbd.DRBD8Dev.Create(self.test_unique_id, self.children, 123, None, {}, False, self.test_dyn_params, test_kwarg="test") self.assertEqual(got, expected)