class_docstr: Base class for async streamlit.server testing.
  
  Subclasses should patch 'streamlit.server.server.AppSession',
  to prevent AppSessions from being created, and scripts from
  being run. (Script running involves creating new threads, which
  interfere with other tests if not properly terminated.)
  
  See the "ServerTest" class for example usage.
class_docstr_tok: ["Base","class","for","async","streamlit.server","testing",".","Subclasses","should","patch","'streamlit.server.server.AppSession","'",",","to","prevent","AppSessions","from","being","created",",","and","scripts","from","being","run",".","(","Script","running","involves","creating","new","threads",",","which","interfere","with","other","tests","if","not","properly","terminated",".",")","See","the","``","ServerTest","''","class","for","example","usage","."]
code: def tearDown(self) -> None:
      super().tearDown()
      # Server._create_app() will create the Runtime singleton.
      # We null it out in tearDown() so that it doesn't interfere with
      # future tests.
      Runtime._instance = None
  
file_path: streamlit/lib/tests/streamlit/web/server/server_test_case.py
imports: import urllib.parse
  from unittest import mock
  import tornado.testing
  import tornado.web
  import tornado.websocket
  from tornado.websocket import WebSocketClientConnection
  from streamlit.proto.ForwardMsg_pb2 import ForwardMsg
  from streamlit.runtime import Runtime
  from streamlit.runtime.app_session import AppSession
  from streamlit.web.server import Server
label_desc: Use image node_id 1 for calling the ServerTestCase obj's underlying member method code with example usage: obj.tearDown() without return types