Example #1
0
 def test_connection_established_notifies_master(self):
     slavecon = SlaveConnection(Mock(Master))
     slavecon.connection_established("123.123.123.123:123123")
     slavecon.master.notify.called_once_with(Notification.CONNECTION_ESTABLISHED, "123.123.123.123:123123")
Example #2
0
 def test_connection_established_sets_connected_true(self):
     slavecon = SlaveConnection(Mock(Master))
     self.assertFalse(slavecon.connected)
     slavecon.connection_established("123.123.123.123:123123")
     self.assertTrue(slavecon.connected)