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()
def get_ssl_options(self): return dict(ssl_version=self.get_ssl_version(), # type: ignore **AsyncHTTPSTestCase.get_ssl_options())
def get_ssl_options(self): context = ssl_options_to_context( AsyncHTTPSTestCase.get_ssl_options(self)) assert isinstance(context, ssl.SSLContext) return context
def get_ssl_options(self): return dict(ssl_version=self.get_ssl_version(), **AsyncHTTPSTestCase.default_ssl_options())
def get_ssl_options(self): return dict( ssl_version=self.get_ssl_version(), # type: ignore **AsyncHTTPSTestCase.get_ssl_options())
def tearDown(self): AsyncHTTPSTestCase.tearDown(self) AsyncTestCase.tearDown(self) self.tear_down_temp_dir()
def setUp(self): AsyncTestCase.setUp(self) AsyncHTTPSTestCase.setUp(self) self.set_up_temp_dir()
def get_ssl_options(self): return dict( ssl_version=self.get_ssl_version(), **AsyncHTTPSTestCase.default_ssl_options() )
def setUp(self): AsyncTestCase.setUp(self) AsyncHTTPSTestCase.setUp(self) # Wait for the app to start up properly (for good luck). time.sleep(0.5)
def get_ssl_options(self): return dict(ssl_version=ssl.PROTOCOL_SSLv2, **AsyncHTTPSTestCase.get_ssl_options(self))