allow both 400 and 403 in test_access_control_private_valid_semantic_token

This commit is contained in:
Godmar Back 2021-04-23 09:57:20 -04:00
parent 3a8a4bed96
commit beffc8ad32

View File

@ -1594,7 +1594,9 @@ class Access_Control(Doc_Print_Test_Case):
raise AssertionError("The server did not respond within 2s") raise AssertionError("The server did not respond within 2s")
# Ensure that the user is not authenticated # Ensure that the user is not authenticated
self.assertEqual(response.status_code, requests.codes.bad_request, "Authentication failed.") # accepted responses include 400 and 403
if response.status_code not in [requests.codes.bad_request, requests.codes.forbidden]:
raise AssertionError("Server did not respond with 403 or 400 to missing authentication info")
# Define the private URL to get # Define the private URL to get
url = 'http://%s:%s/%s' % (self.hostname, self.port, self.private_file) url = 'http://%s:%s/%s' % (self.hostname, self.port, self.private_file)