mirror of
https://github.com/OpenKMIP/PyKMIP.git
synced 2025-07-25 15:04:23 +02:00
Removing bandit/pyaml version requirements
This commit is contained in:
parent
a664187bc4
commit
400c29bc4f
@ -88,7 +88,7 @@ class SLUGSConnector(api.AuthAPI):
|
|||||||
)
|
)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
response = requests.get(self.users_url.format(user_id))
|
response = requests.get(self.users_url.format(user_id), timeout=10)
|
||||||
except Exception:
|
except Exception:
|
||||||
raise exceptions.ConfigurationError(
|
raise exceptions.ConfigurationError(
|
||||||
"A connection could not be established using the SLUGS URL."
|
"A connection could not be established using the SLUGS URL."
|
||||||
@ -98,7 +98,7 @@ class SLUGSConnector(api.AuthAPI):
|
|||||||
"Unrecognized user ID: {}".format(user_id)
|
"Unrecognized user ID: {}".format(user_id)
|
||||||
)
|
)
|
||||||
|
|
||||||
response = requests.get(self.groups_url.format(user_id))
|
response = requests.get(self.groups_url.format(user_id), timeout=10)
|
||||||
if response.status_code == 404:
|
if response.status_code == 404:
|
||||||
raise exceptions.PermissionDenied(
|
raise exceptions.PermissionDenied(
|
||||||
"Group information could not be retrieved for user ID: "
|
"Group information could not be retrieved for user ID: "
|
||||||
|
@ -137,10 +137,10 @@ class TestSLUGSConnector(testtools.TestCase):
|
|||||||
|
|
||||||
mock_get_client_identity.assert_called_once_with("test")
|
mock_get_client_identity.assert_called_once_with("test")
|
||||||
mock_request_get.assert_any_call(
|
mock_request_get.assert_any_call(
|
||||||
"http://127.0.0.1:8080/test/slugs/users/John Doe"
|
"http://127.0.0.1:8080/test/slugs/users/John Doe", timeout=10
|
||||||
)
|
)
|
||||||
mock_request_get.assert_any_call(
|
mock_request_get.assert_any_call(
|
||||||
"http://127.0.0.1:8080/test/slugs/users/John Doe/groups"
|
"http://127.0.0.1:8080/test/slugs/users/John Doe/groups", timeout=10
|
||||||
)
|
)
|
||||||
self.assertEqual(('John Doe', ['Group A', 'Group B']), result)
|
self.assertEqual(('John Doe', ['Group A', 'Group B']), result)
|
||||||
|
|
||||||
|
@ -6,5 +6,5 @@ fixtures
|
|||||||
mock
|
mock
|
||||||
slugs
|
slugs
|
||||||
sphinx
|
sphinx
|
||||||
PyYAML<=5.2
|
PyYAML
|
||||||
bandit==1.5.1
|
bandit
|
||||||
|
Loading…
x
Reference in New Issue
Block a user