MCPcopy
hub / github.com/hacs/integration / test_exception_handling

Function test_exception_handling

tests/test_data_client.py:71–84  ·  view source on GitHub ↗

Test the base result.

(
    hacs: HacsBase,
    response_mocker: ResponseMocker,
    exception: Exception,
    expectation: ContextManager,
)

Source from the content-addressed store, hash-verified

69 ),
70)
71async def test_exception_handling(
72 hacs: HacsBase,
73 response_mocker: ResponseMocker,
74 exception: Exception,
75 expectation: ContextManager,
76):
77 """Test the base result."""
78 response_mocker.add(
79 "https://data-v2.hacs.xyz/integration/repositories.json",
80 response=MockedResponse(exception=exception),
81 )
82
83 with expectation:
84 await hacs.data_client.get_repositories("integration")
85
86
87@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 3

MockedResponseClass · 0.90
get_repositoriesMethod · 0.80
addMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…