Better error tracebacks, closes #11

This commit is contained in:
Simon Willison 2023-07-17 15:20:59 -07:00
commit d58100a0d5
2 changed files with 34 additions and 4 deletions

View file

@ -17,7 +17,10 @@ def test_query_error(httpx_mock):
runner = CliRunner()
result = runner.invoke(cli, ["query", "https://example.com", "hello"])
assert result.exit_code == 1
assert result.output == "Error: Invalid SQL: Statement must be a SELECT\n"
assert (
result.output
== "Error: 400 status code. Invalid SQL: Statement must be a SELECT\n"
)
def test_query(httpx_mock):