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