Update the assertRaises example to be more modern

Change-Id: I801877038adbefb263144df4eb9204dcd2367294
This commit is contained in:
Dougal Matthews 2016-02-24 12:03:02 +00:00
parent c11724e7fd
commit 4cffaafa3c

View File

@ -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