'Test correct initialization and setup of factory observers.'

def test_basic(self):

    sm = self.streamManager
    self.assertIdentical(None, sm.xmlstream)
    self.assertEqual([], sm.handlers)
    self.assertEqual(sm._connected, sm.factory.callbacks['//event/stream/connected'])
    self.assertEqual(sm._authd, sm.factory.callbacks['//event/stream/authd'])
    self.assertEqual(sm._disconnected, sm.factory.callbacks['//event/stream/end'])
    self.assertEqual(sm.initializationFailed, sm.factory.callbacks['//event/xmpp/initfailed'])
