Update
unknown
plain_text
4 years ago
2.6 kB
11
Indexable
self = <galaxy_test.api.test_group_users.GroupUsersApiTestCase testMethod=test_update>
def test_update(self):
group_name = "group-without-users"
group = self._create_group(group_name, encoded_user_ids=[])
encoded_group_id = group["id"]
group_users = self._get_group_users(encoded_group_id)
assert len(group_users) == 0
encoded_user_id = self.dataset_populator.user_id()
update_response = self._put(f"groups/{encoded_group_id}/users/{encoded_user_id}", admin=True)
> self._assert_status_code_is_ok(update_response)
lib/galaxy_test/api/test_group_users.py:69:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
lib/galaxy_test/base/api.py:111: in _assert_status_code_is_ok
assert_status_code_is_ok(response)
lib/galaxy_test/base/api_asserts.py:36: in assert_status_code_is_ok
_report_status_code_error(response, "2XX")
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
response = <Response [404]>, expected_status_code = '2XX'
def _report_status_code_error(response: Response, expected_status_code: Union[str, int]):
try:
body = response.json()
except Exception:
body = f"INVALID JSON RESPONSE <{response.text}>"
assertion_message = ASSERT_FAIL_STATUS_CODE % (response.status_code, expected_status_code, body)
> raise AssertionError(assertion_message)
E AssertionError: Request status code (404) was not expected value 2XX. Body was INVALID JSON RESPONSE <<html>
E <head>
E <title>404 Not Found</title>
E </head>
E <body>
E <h1>404 Not Found</h1>
E The resource could not be found.<br /><br />
E No route for /api/groups/cb227cec8ca83994/users/adb5f5c93f827949
E
E
E </body>
E </html>>
lib/galaxy_test/base/api_asserts.py:45: AssertionError
------------------------------Captured stdout call------------------------------
INFO: 127.0.0.1:58324 - "GET /api/users HTTP/1.1" 200 OK
INFO: 127.0.0.1:58325 - "POST /api/users/adb5f5c93f827949/api_key HTTP/1.1" 200 OK
INFO: 127.0.0.1:58326 - "POST /api/groups HTTP/1.1" 200 OK
INFO: 127.0.0.1:58327 - "GET /api/groups/cb227cec8ca83994/users HTTP/1.1" 200 OK
INFO: 127.0.0.1:58328 - "GET /api/users HTTP/1.1" 200 OK
INFO: 127.0.0.1:58329 - "PUT /api/groups/cb227cec8ca83994/users/adb5f5c93f827949 HTTP/1.1" 404 Not Found
INFO: 127.0.0.1:58330 - "GET /api/jobs?state=running&?user_details=true HTTP/1.1" 200 OK
Editor is loading...