예제 #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)