Add ut for show not exist device_profile client api
Change-Id: I49892997d26185e80a27ec2b029575e3c207624c
This commit is contained in:
parent
da3392d687
commit
e31150d377
|
@ -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):
|
||||
|
||||
|
|
Loading…
Reference in New Issue