Skip to content

Commit

Permalink
Removing bandit/pyaml version requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
justin-h-loi authored and arp102 committed Aug 29, 2023
1 parent a664187 commit 400c29b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions kmip/services/server/auth/slugs.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def authenticate(self,
)

try:
response = requests.get(self.users_url.format(user_id))
response = requests.get(self.users_url.format(user_id), timeout=10)
except Exception:
raise exceptions.ConfigurationError(
"A connection could not be established using the SLUGS URL."
Expand All @@ -98,7 +98,7 @@ def authenticate(self,
"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:
raise exceptions.PermissionDenied(
"Group information could not be retrieved for user ID: "
Expand Down
4 changes: 2 additions & 2 deletions kmip/tests/unit/services/server/auth/test_slugs.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,10 @@ def test_authenticate(self, mock_get_client_identity, mock_request_get):

mock_get_client_identity.assert_called_once_with("test")
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(
"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)

Expand Down
4 changes: 2 additions & 2 deletions test-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ fixtures
mock
slugs
sphinx
PyYAML<=5.2
bandit==1.5.1
PyYAML
bandit

0 comments on commit 400c29b

Please sign in to comment.