Example #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()
Example #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()
Example #3
0
 def test_connection_failure(self):
     self.connected = True
     self.on_failure(failure_protocol_entity())
     self.assertFalse(self.connected)
Example #4
0
 def test_connection_failure(self):
     self.connected = True
     self.on_failure(failure_protocol_entity())
     self.assertFalse(self.connected)