Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async def mock_request(method, path, **kwargs):
kwargs["method"] = method
kwargs["path"] = path
bridge.mock_requests.append(kwargs)
if path == "sensors":
return bridge.mock_sensor_responses.popleft()
return None
async def async_request_call(coro):
await coro
bridge.async_request_call = async_request_call
bridge.api.config.apiversion = "9.9.9"
bridge.api.sensors = Sensors({}, mock_request)
return bridge