def setUp(self):
     """
     `self._patcher`用于在`TestCase`类中创建patcher后, 能够被`tearDown()`回收.
     """
     AsyncHTTPSTestCase.setUp(self)
     self._patcher = []
     self.default_mock()
 def tearDown(self):
     """
     回收patcher
     :return: 
     """
     AsyncHTTPSTestCase.tearDown(self)
     for patcher in self._patcher:
         patcher.stop()
Exemple #3
0
 def get_ssl_options(self):
     return dict(ssl_version=self.get_ssl_version(),  # type: ignore
                 **AsyncHTTPSTestCase.get_ssl_options())
Exemple #4
0
 def get_ssl_options(self):
     context = ssl_options_to_context(
         AsyncHTTPSTestCase.get_ssl_options(self))
     assert isinstance(context, ssl.SSLContext)
     return context
Exemple #5
0
 def get_ssl_options(self):
     context = ssl_options_to_context(
         AsyncHTTPSTestCase.get_ssl_options(self))
     assert isinstance(context, ssl.SSLContext)
     return context
Exemple #6
0
 def get_ssl_options(self):
     return dict(ssl_version=self.get_ssl_version(),
                 **AsyncHTTPSTestCase.default_ssl_options())
Exemple #7
0
 def get_ssl_options(self):
     return dict(
         ssl_version=self.get_ssl_version(),  # type: ignore
         **AsyncHTTPSTestCase.get_ssl_options())
Exemple #8
0
 def tearDown(self):
     AsyncHTTPSTestCase.tearDown(self)
     AsyncTestCase.tearDown(self)
     self.tear_down_temp_dir()
Exemple #9
0
 def setUp(self):
     AsyncTestCase.setUp(self)
     AsyncHTTPSTestCase.setUp(self)
     self.set_up_temp_dir()
Exemple #10
0
 def get_ssl_options(self):
     return dict(
         ssl_version=self.get_ssl_version(),
         **AsyncHTTPSTestCase.default_ssl_options()
     )
Exemple #11
0
 def tearDown(self):
     AsyncHTTPSTestCase.tearDown(self)
     AsyncTestCase.tearDown(self)
     self.tear_down_temp_dir()
Exemple #12
0
 def setUp(self):
     AsyncTestCase.setUp(self)
     AsyncHTTPSTestCase.setUp(self)
     self.set_up_temp_dir()
Exemple #13
0
 def setUp(self):
     AsyncTestCase.setUp(self)
     AsyncHTTPSTestCase.setUp(self)
     # Wait for the app to start up properly (for good luck).
     time.sleep(0.5)
Exemple #14
0
 def get_ssl_options(self):
     return dict(ssl_version=ssl.PROTOCOL_SSLv2,
                 **AsyncHTTPSTestCase.get_ssl_options(self))
Exemple #15
0
 def setUp(self):
     AsyncTestCase.setUp(self)
     AsyncHTTPSTestCase.setUp(self)
     # Wait for the app to start up properly (for good luck).
     time.sleep(0.5)