2
0
mirror of https://github.com/openkmip/pykmip synced 2025-12-15 15:53:36 +00:00

Merge pull request #438 from OpenKMIP/feat/update-access-denied-error

Raise PermissionDenied on access control violations
This commit is contained in:
Peter Hamilton
2018-05-17 15:55:16 -04:00
committed by GitHub
2 changed files with 8 additions and 8 deletions

View File

@@ -2376,7 +2376,7 @@ class TestKmipEngine(testtools.TestCase):
args = [id_a, enums.Operation.GET]
six.assertRaisesRegex(
self,
exceptions.ItemNotFound,
exceptions.PermissionDenied,
"Could not locate object: {0}".format(id_a),
e._get_object_with_access_controls,
*args
@@ -4659,7 +4659,7 @@ class TestKmipEngine(testtools.TestCase):
args = [payload]
six.assertRaisesRegex(
self,
exceptions.ItemNotFound,
exceptions.PermissionDenied,
"Could not locate object: {0}".format(id_a),
e._process_get,
*args
@@ -5505,7 +5505,7 @@ class TestKmipEngine(testtools.TestCase):
# be retrieved.
args = [payload]
self.assertRaisesRegex(
exceptions.ItemNotFound,
exceptions.PermissionDenied,
"Could not locate object: {0}".format(id_a),
e._process_get_attributes,
*args
@@ -5694,7 +5694,7 @@ class TestKmipEngine(testtools.TestCase):
# be retrieved.
args = [payload]
self.assertRaisesRegex(
exceptions.ItemNotFound,
exceptions.PermissionDenied,
"Could not locate object: {0}".format(id_a),
e._process_get_attribute_list,
*args
@@ -5876,7 +5876,7 @@ class TestKmipEngine(testtools.TestCase):
# Test by specifying the ID of the object to activate.
args = [payload]
self.assertRaisesRegex(
exceptions.ItemNotFound,
exceptions.PermissionDenied,
"Could not locate object: {0}".format(id_a),
e._process_activate,
*args
@@ -6197,7 +6197,7 @@ class TestKmipEngine(testtools.TestCase):
args = [payload]
self.assertRaisesRegex(
exceptions.ItemNotFound,
exceptions.PermissionDenied,
"Could not locate object: {0}".format(id_a),
e._process_revoke,
*args
@@ -6340,7 +6340,7 @@ class TestKmipEngine(testtools.TestCase):
args = [payload]
six.assertRaisesRegex(
self,
exceptions.ItemNotFound,
exceptions.PermissionDenied,
"Could not locate object: {0}".format(id_a),
e._process_destroy,
*args