def test_reset_password_for_inexistent_workspace(self):
"""
Workspace endpoint raises HTTPError when mock resetting password for
inexistent workspace
"""
msg = ('404 Client Error: Not Found for url: '
'https://connection.keboola.com/v2/storage/workspaces/1/'
'password')
responses.add(
responses.Response(
method='POST',
url=('https://connection.keboola.com/v2/storage/workspaces/'
'1/password'),
body=HTTPError(msg)
)
)
workspace_id = '1'
with self.assertRaises(HTTPError) as error_context:
self.ws.reset_password(workspace_id)
assert error_context.exception.args[0] == msg
评论列表
文章目录