Skip to content

Commit 211fdba

Browse files
committed
Require more specific exception
This is follow-up of 1e68348 and replaces the generic Exception asserted in a unit tests by the specific castellan exception, according to the 4.4.0 release. This change does not bump minimum required version of castellan because the version requirement only affects unit tests. Depends-on: https://review.opendev.org/c/openstack/requirements/+/911059 Change-Id: Id1ed909f179038713d9da2fd72cf39e7fb7c8dfe
1 parent cd88112 commit 211fdba

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

glance/tests/unit/v2/test_images_resource.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3877,9 +3877,7 @@ def test_delete_encryption_key(self):
38773877
virtual_size=3072, extra_properties=props)
38783878
self.controller._delete_encryption_key(request.context, image)
38793879
# Make sure the encryption key is gone
3880-
# TODO(tkajinam): Replace Exception by ManagedObjectNotFoundError once
3881-
# castellan in u-c is bumped to 4.4.0
3882-
self.assertRaises(Exception, # noqa
3880+
self.assertRaises(castellan_exception.ManagedObjectNotFoundError,
38833881
self.controller._key_manager.get,
38843882
request.context, fake_encryption_key)
38853883

0 commit comments

Comments
 (0)