def test_node_show(self): actual = {} fake_print_dict = lambda data, *args, **kwargs: actual.update(data) with mock.patch.object(cliutils, 'print_dict', fake_print_dict): node = object() n_shell._print_node_show(node) exp = ['chassis_uuid', 'created_at', 'console_enabled', 'driver', 'driver_info', 'extra', 'instance_info', 'instance_uuid', 'last_error', 'maintenance', 'power_state', 'properties', 'provision_state', 'reservation', 'target_power_state', 'target_provision_state', 'updated_at', 'uuid'] act = actual.keys() self.assertEqual(sorted(exp), sorted(act))
def test_node_show(self): actual = {} fake_print_dict = lambda data, *args, **kwargs: actual.update(data) with mock.patch.object(cliutils, 'print_dict', fake_print_dict): node = object() n_shell._print_node_show(node) exp = ['chassis_uuid', 'created_at', 'console_enabled', 'driver', 'driver_info', 'driver_internal_info', 'extra', 'instance_info', 'instance_uuid', 'last_error', 'maintenance', 'maintenance_reason', 'name', 'power_state', 'properties', 'provision_state', 'reservation', 'target_power_state', 'target_provision_state', 'updated_at', 'inspection_finished_at', 'inspection_started_at', 'uuid'] act = actual.keys() self.assertEqual(sorted(exp), sorted(act))
def test_node_show(self): actual = {} fake_print_dict = lambda data, *args, **kwargs: actual.update(data) with mock.patch.object(cliutils, "print_dict", fake_print_dict): node = object() n_shell._print_node_show(node) exp = [ "chassis_uuid", "clean_step", "created_at", "console_enabled", "driver", "driver_info", "driver_internal_info", "extra", "instance_info", "instance_uuid", "last_error", "maintenance", "maintenance_reason", "name", "power_state", "properties", "provision_state", "provision_updated_at", "reservation", "target_power_state", "target_provision_state", "updated_at", "inspection_finished_at", "inspection_started_at", "uuid", ] act = actual.keys() self.assertEqual(sorted(exp), sorted(act))
def test_node_show(self): actual = {} fake_print_dict = lambda data, *args, **kwargs: actual.update(data) with mock.patch.object(cliutils, 'print_dict', fake_print_dict): node = object() n_shell._print_node_show(node) exp = [ 'chassis_uuid', 'clean_step', 'created_at', 'console_enabled', 'driver', 'driver_info', 'driver_internal_info', 'extra', 'instance_info', 'instance_uuid', 'last_error', 'maintenance', 'maintenance_reason', 'name', 'boot_interface', 'console_interface', 'deploy_interface', 'inspect_interface', 'management_interface', 'network_interface', 'power_interface', 'raid_interface', 'vendor_interface', 'power_state', 'properties', 'provision_state', 'provision_updated_at', 'reservation', 'resource_class', 'target_power_state', 'target_provision_state', 'updated_at', 'inspection_finished_at', 'inspection_started_at', 'uuid', 'raid_config', 'target_raid_config' ] act = actual.keys() self.assertEqual(sorted(exp), sorted(act))