code: def test_flow_debug_endpoints():
      f1 = Flow(
          protocol="http",
          no_debug_endpoints=True,
          no_crud_endpoints=True,
      ).add(uses=MyExec)
  
      with pytest.raises(BadClient):
          with f1:
              f1.post("/foo")
  
      f2 = Flow(protocol="http", no_crud_endpoints=True).add(
          uses=MyExec
      )
      with f2:
          f2.post("/foo")
  
file_path: jina/tests/unit/orchestrate/flow/flow-orchestrate/test_flow_http_extend.py
imports: import pytest
  from jina import Executor, requests, Flow
  from jina.excepts import BadClient
label_desc: Use image node_id 1 for calling a global function with example usage: test_flow_debug_endpoints() without return types