code: def test_serves_directory_index(self, site_dir):
      with testing_server(site_dir) as server:
          headers, output = do_request(server, "GET /")
          self.assertRegex(output, r"^<body>aaa</body>$")
          self.assertEqual(headers["_status"], "200 OK")
          self.assertEqual(headers.get("content-type"), "text/html")
          self.assertEqual(
              headers.get("content-length"), str(len(output))
          )
  
          for path in "/foo/", "/foo/index.html":
              _, output = do_request(server, f"GET {path}")
              self.assertRegex(output, r"^<body>bbb</body>$")
  
          with self.assertLogs("mkdocs.livereload"):
              headers, _ = do_request(server, "GET /foo/index.html/")
          self.assertEqual(headers["_status"], "404 Not Found")
  
imports: import contextlib
  import email
  import io
  import sys
  import threading
  import time
  import unittest
  from pathlib import Path
  from unittest import mock
  from mkdocs.livereload import LiveReloadServer
  from mkdocs.tests.base import change_dir, tempdir
label_desc: Use image node_id 12 for calling the BuildTests obj's underlying member method code with example usage: obj.test_serves_directory_index(site_dir) without return types