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

Method get

tests/common.py:432–444  ·  view source on GitHub ↗
(self, url: str, *args, **kwargs)

Source from the content-addressed store, hash-verified

430 self.responses[url] = response
431
432 def get(self, url: str, *args, **kwargs) -> MockedResponse:
433 data = {"url": url, "args": list(args), "kwargs": kwargs}
434 if (request := REQUEST_CONTEXT.get()) is not None:
435 data["_test_caller"] = f"{
436 request.node.location[0]}::{request.node.name}"
437 data["_uses_setup_integration"] = request.node.name != "test_integration_setup" and (
438 "setup_integration" in request.fixturenames or "hacs" in request.fixturenames
439 )
440 self.calls.append(data)
441 response = self.responses.get(url, None)
442 if response is not None and response.keep:
443 return response
444 return self.responses.pop(url, None)
445
446
447class ProxyClientSession(ClientSession):

Callers 15

async_register_frontendFunction · 0.80
async_step_userMethod · 0.80
_show_config_formMethod · 0.80
async_step_userMethod · 0.80
registerMethod · 0.80
get_by_idMethod · 0.80
get_by_full_nameMethod · 0.80
removed_repositoryMethod · 0.80
async_download_fileMethod · 0.80

Calls

no outgoing calls

Tested by 7

test_switch_entity_stateFunction · 0.64
test_update_entity_stateFunction · 0.64
exc_handleFunction · 0.64
_entity_stateFunction · 0.64
track_api_usageFunction · 0.64
test_domain_ovveridesFunction · 0.64