Function
test_no_path_query_error
(client: dagger.Client, httpx_mock: HTTPXMock)
Source from the content-addressed store, hash-verified
| 80 | |
| 81 | |
| 82 | async def test_no_path_query_error(client: dagger.Client, httpx_mock: HTTPXMock): |
| 83 | msg = "invalid request" |
| 84 | error = { |
| 85 | "message": msg, |
| 86 | } |
| 87 | httpx_mock.add_response(json={"errors": [error]}) |
| 88 | |
| 89 | with pytest.raises(dagger.QueryError) as exc_info: |
| 90 | await client.container().from_("invalid!") |
| 91 | |
| 92 | exc = exc_info.value |
| 93 | assert msg in str(exc) |
| 94 | assert exc.errors[0].path is None |
| 95 | assert exc.errors[0].locations is None |
| 96 | |
| 97 | |
| 98 | async def test_exec_error(client: dagger.Client, httpx_mock: HTTPXMock): |
Callers
nothing calls this directly
Tested by
no test coverage detected