Update the assertRaises example to be more modern
Change-Id: I801877038adbefb263144df4eb9204dcd2367294
This commit is contained in:
@@ -300,8 +300,8 @@ exception possible should be used.
|
|||||||
|
|
||||||
Example::
|
Example::
|
||||||
|
|
||||||
self.assertRaises(exception.InstanceNotFound, db.instance_get_by_uuid,
|
with self.assertRaises(exception.InstanceNotFound):
|
||||||
elevated, instance_uuid)
|
db.instance_get_by_uuid(elevated, instance_uuid)
|
||||||
|
|
||||||
|
|
||||||
OpenStack Trademark
|
OpenStack Trademark
|
||||||
|
|||||||
Reference in New Issue
Block a user