def test_do_md_object_show(self): args = self._make_args({"namespace": "MyNamespace", "object": "MyObject", "max_column_width": 80}) with mock.patch.object(self.gc.metadefs_object, "get") as mocked_get: expect_object = {} expect_object["namespace"] = "MyNamespace" expect_object["object"] = "MyObject" mocked_get.return_value = expect_object test_shell.do_md_object_show(self.gc, args) mocked_get.assert_called_once_with("MyNamespace", "MyObject") utils.print_dict.assert_called_once_with(expect_object, 80)
def test_do_md_object_show(self): args = self._make_args({'namespace': 'MyNamespace', 'object': 'MyObject', 'max_column_width': 80}) with mock.patch.object(self.gc.metadefs_object, 'get') as mocked_get: expect_object = {} expect_object['namespace'] = 'MyNamespace' expect_object['object'] = 'MyObject' mocked_get.return_value = expect_object test_shell.do_md_object_show(self.gc, args) mocked_get.assert_called_once_with('MyNamespace', 'MyObject') utils.print_dict.assert_called_once_with(expect_object, 80)