示例#1
0
 def connect(self):
     if self.error_auth:
         self.connected = False
         protocol_entity = failure_protocol_entity()
     else:
         self.connected = True
         protocol_entity = success_protocol_entity()
     self.toUpper(protocol_entity)
     if not self.connected:
         raise AuthError()
示例#2
0
 def connect(self):
     if self.error_auth:
         self.connected = False
         protocol_entity = failure_protocol_entity()
     else:
         self.connected = True
         protocol_entity = success_protocol_entity()
     self.toUpper(protocol_entity)
     if not self.connected:
         raise AuthError()
示例#3
0
 def test_connection_failure(self):
     self.connected = True
     self.on_failure(failure_protocol_entity())
     self.assertFalse(self.connected)
示例#4
0
 def test_connection_failure(self):
     self.connected = True
     self.on_failure(failure_protocol_entity())
     self.assertFalse(self.connected)