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