def return_volume_types_get_volume_type(context, id):
    if id == "777":
        raise exception.VolumeTypeNotFound(volume_type_id=id)
    return stub_volume_type(int(id))
Esempio n. 2
0
 def test_volume_type_not_found(self):
     # verify response code for exception.VolumeTypeNotFound
     volume_type_id = "fake_volume_type_id"
     e = exception.VolumeTypeNotFound(volume_type_id=volume_type_id)
     self.assertEqual(e.code, 404)
     self.assertIn(volume_type_id, e.msg)