code: def test_request_invalid_route(tmp_path, basic_config_dict):
      config = tmp_path / "config.yaml"
      save_yaml(config, basic_config_dict)
  
      with Gateway(config) as gateway:
          # Test get
          response = gateway.get(f"{BASE_ROUTE}invalid/")
          assert response.status_code == 404
          assert response.json() == {
              "detail": "The route 'invalid' is not present or active on the server. Please "
              "verify the route name."
          }
  
          # Test post
          response = gateway.post(
              f"{BASE_ROUTE}invalid", json={"input": "should fail"}
          )
          assert response.status_code == 405
          assert response.json() == {"detail": "Method Not Allowed"}
  
file_path: mlflow/tests/gateway/test_runner.py
imports: from pathlib import Path
  import pytest
  from tests.gateway.tools import Gateway, save_yaml
label_desc: Use image node_id 10 for calling a global function with example usage: test_request_invalid_route(tmp_path, basic_config_dict) without return types