MCPcopy Create free account
hub / github.com/dagger/dagger / test_no_path_query_error

Function test_no_path_query_error

sdk/python/tests/client/test_execute_errors.py:82–95  ·  view source on GitHub ↗
(client: dagger.Client, httpx_mock: HTTPXMock)

Source from the content-addressed store, hash-verified

80
81
82async 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
98async def test_exec_error(client: dagger.Client, httpx_mock: HTTPXMock):

Callers

nothing calls this directly

Calls 2

from_Method · 0.80
containerMethod · 0.45

Tested by

no test coverage detected