'Test that protocol handlers have their connectionInitialized method
called when the XML stream is initialized.'

def test_authd(self):

    sm = self.streamManager
    handler = DummyXMPPHandler()
    handler.setHandlerParent(sm)
    xs = xmlstream.XmlStream(xmlstream.Authenticator())
    sm._authd(xs)
    self.assertEqual(0, handler.doneMade)
    self.assertEqual(1, handler.doneInitialized)
    self.assertEqual(0, handler.doneLost)
