def METHOD_NAME():
    """Assert creating the resource without the mocked response fails to construct.
    DatahubRestEmitter.test_connection will fail due to the lack of a mock.
    """
    with pytest.raises(DagsterResourceFunctionError):
        @op(required_resource_keys={"datahub"})
        def bad_datahub_op():
            # Error should be thrown prior to executing the op.
            # Should Fail if it gets to this point
            assert False
        context = build_op_context(
            resources={
                "datahub": datahub_rest_emitter.configured(
                    {
                        "connection": "http://foobar:8080",
                        "read_timeout_sec": 0.01,
                        "connect_timeout_sec": 0.01,
                        "retry_max_times": 1,
                    }
                )
            }
        )
        bad_datahub_op(context)