docstr: If we have no stats, we expect to see just the header and footer.
docstr_tok: ["If","we","have","no","stats",",","we","expect","to","see","just","the","header","and","footer","."]
code: def test_no_stats(self):
      """If we have no stats, we expect to see just the header and footer."""
      response = self.fetch("/_stcore/metrics")
      self.assertEqual(200, response.code)
  
      expected_body = (
          "# TYPE cache_memory_bytes gauge\n"
          "# UNIT cache_memory_bytes bytes\n"
          "# HELP Total memory consumed by a cache.\n"
          "# EOF\n"
      ).encode("utf-8")
  
      self.assertEqual(expected_body, response.body)
  
file_path: streamlit/lib/tests/streamlit/web/server/stats_handler_test.py
imports: from unittest.mock import MagicMock
  import tornado.testing
  import tornado.web
  from google.protobuf.json_format import MessageToDict
  from tornado.httputil import HTTPHeaders
  from streamlit.proto.openmetrics_data_model_pb2 import MetricSet
  from streamlit.runtime.stats import CacheStat
  from streamlit.web.server.server import METRIC_ENDPOINT
  from streamlit.web.server.stats_request_handler import StatsRequestHandler
label_desc: Use image node_id 2 for calling the StatsHandlerTest obj's underlying member method code with example usage: obj.test_no_stats() without return types