コード例 #1
0
ファイル: custom_mock.py プロジェクト: junaruga/pcs
 def add_handle(self, handle):
     if not isinstance(handle, MockCurl):
         raise AssertionError("Only MockCurl objects are allowed")
     if handle in self._handle_list:
         # same error as real CurlMulti object
         raise pycurl.error("curl object already on this multi-stack")
     self._handle_list.append(handle)
コード例 #2
0
ファイル: custom_mock.py プロジェクト: tomjelinek/pcs
 def add_handle(self, handle):
     if not isinstance(handle, MockCurl):
         raise AssertionError("Only MockCurl objects are allowed")
     if handle in self._handle_list:
         # same error as real CurlMulti object
         raise pycurl.error("curl object already on this multi-stack")
     self._handle_list.append(handle)
コード例 #3
0
ファイル: custom_mock.py プロジェクト: junaruga/pcs
 def remove_handle(self, handle):
     if handle not in self._handle_list:
         # same error as real CurlMulti object
         raise pycurl.error("curl object not on this multi-stack")
     self._handle_list.remove(handle)
コード例 #4
0
ファイル: custom_mock.py プロジェクト: tomjelinek/pcs
 def remove_handle(self, handle):
     if handle not in self._handle_list:
         # same error as real CurlMulti object
         raise pycurl.error("curl object not on this multi-stack")
     self._handle_list.remove(handle)