def op(self, mocker): method_response = MethodResponse( request_id="fake_request_id", status=200, payload={"some": "json"} ) return pipeline_ops_iothub.SendMethodResponseOperation( method_response=method_response, callback=mocker.MagicMock() )
fake_hostname = "__fake_hostname__" fake_gateway_hostname = "__fake_gateway_hostname__" fake_ca_cert = "__fake_ca_cert__" fake_message_body = "__fake_message_body__" fake_output_name = "__fake_output_name__" fake_content_type = "text/json" fake_content_type_encoded = "%24.ct=text%2Fjson" fake_message = Message(fake_message_body) fake_request_id = "__fake_request_id__" fake_method_name = "__fake_method_name__" fake_method_payload = "__fake_method_payload__" fake_method_status = "__fake_method_status__" fake_method_response = MethodResponse(request_id=fake_request_id, status=fake_method_status, payload=fake_method_payload) invalid_feature_name = "__invalid_feature_name__" unmatched_mqtt_topic = "__unmatched_mqtt_topic__" fake_mqtt_payload = "__fake_mqtt_payload__" fake_c2d_topic = "devices/{}/messages/devicebound/".format(fake_device_id) fake_c2d_topic_with_content_type = "{}{}".format(fake_c2d_topic, fake_content_type_encoded) fake_c2d_topic_for_another_device = "devices/__other_device__/messages/devicebound/" fake_input_name = "__fake_input_name__" fake_input_message_topic = "devices/{}/modules/{}/inputs/{}/".format( fake_device_id, fake_module_id, fake_input_name) fake_input_message_topic_with_content_type = "{}{}".format(