class_docstr: Tests SSL server
class_docstr_tok: ["Tests","SSL","server"]
docstr: The test checks the behavior whenever one of the two requires file is missing.
docstr_tok: ["The","test","checks","the","behavior","whenever","one","of","the","two","requires","file","is","missing","."]
code: def test_missing_file(self, option_name):
      """
      The test checks the behavior whenever one of the two requires file is missing.
      """
      with contextlib.ExitStack() as exit_stack:
          tmp_dir = exit_stack.enter_context(
              tempfile.TemporaryDirectory()
          )
  
          cert_file = Path(tmp_dir) / "cert.cert"
          key_file = Path(tmp_dir) / "key.key"
  
          new_options = {
              "server.sslCertFile": cert_file,
              "server.sslKeyFile": key_file,
          }
          exit_stack.enter_context(patch_config_options(new_options))
  
          # Create only one file
          Path(new_options[option_name]).write_text("TEST-CONTENT")
  
          exit_stack.enter_context(pytest.raises(SystemExit))
          logs = exit_stack.enter_context(
              self.assertLogs("streamlit.web.server.server")
          )
  
          start_listening(mock.MagicMock())
  
      self.assertRegex(
          logs.output[0],
          r"ERROR:streamlit\.web\.server\.server:(Cert|Key) file "
          r"'.+' does not exist\.",
      )
  
imports: import asyncio
  import contextlib
  import errno
  import os
  import subprocess
  import tempfile
  import unittest
  from pathlib import Path
  from unittest import mock
  from unittest.mock import patch
  import pytest
  import tornado.httpserver
  import tornado.testing
  import tornado.web
  import tornado.websocket
  from parameterized import parameterized
  import streamlit.web.server.server
  from streamlit import config
  from streamlit.logger import get_logger
  from streamlit.proto.ForwardMsg_pb2 import ForwardMsg
  from streamlit.runtime import Runtime, RuntimeState
  from streamlit.web.server.server import MAX_PORT_SEARCH_RETRIES, RetriesExceeded, Server, start_listening
  from tests.streamlit.message_mocks import create_dataframe_msg
  from tests.streamlit.web.server.server_test_case import ServerTestCase
  from tests.testutil import patch_config_options
label_desc: Use image node_id 2 for calling the SslServerTest obj's underlying member method code with example usage: obj.test_missing_file(option_name) without return types