def test_load_inexistent_tables_to_workspace(self):
"""
Workspace endpoint raises HTTPError when mock loading inexistent table
"""
msg = ('404 Client Error: Not Found for url: '
'https://connection.keboola.com/v2/storage/workspaces/78432/'
'load')
responses.add(
responses.Response(
method='POST',
url=('https://connection.keboola.com/v2/storage/workspaces/'
'78432/load'),
body=HTTPError(msg)
)
)
workspace_id = '78432'
mapping = {"in.c-table.does_not_exist": "my-table"}
with self.assertRaises(HTTPError) as error_context:
self.ws.load_tables(workspace_id, mapping)
assert error_context.exception.args[0] == msg
评论列表
文章目录