diff --git a/cyborgclient/tests/unit/osc/v2/test_device_profile.py b/cyborgclient/tests/unit/osc/v2/test_device_profile.py index 8a21ad9..b92de7f 100644 --- a/cyborgclient/tests/unit/osc/v2/test_device_profile.py +++ b/cyborgclient/tests/unit/osc/v2/test_device_profile.py @@ -137,6 +137,17 @@ class TestDeviceProfileShow(TestDeviceProfile): formatters=formatters) self.assertEqual(result, (columns, expected)) + def test_device_profile_show_not_exist(self): + get_arq_req = self.mock_acc_client.get_device_profile + get_arq_req.side_effect = sdk_exc.ResourceNotFound + arglist = [acc_fakes.device_profile_name] + verifylist = [] + parsed_args = self.check_parser(self.cmd, arglist, verifylist) + self.assertRaisesRegex( + exc.CommandError, + 'device_profile %s not found' % acc_fakes.device_profile_name, + self.cmd.take_action, parsed_args) + class TestDeviceProfileCreate(TestDeviceProfile):