'The received stream header should have a \'to\' attribute.'

def test_streamStartedNoTo(self):

    streamErrors = []
    xs = self.xmlstream
    xs.sendStreamError = streamErrors.append
    xs.makeConnection(self)
    xs.dataReceived("<stream:stream    xmlns='jabber:component:accept'    xmlns:stream='http://etherx.jabber.org/streams'>")
    self.assertEqual(1, len(streamErrors))
    self.assertEqual('improper-addressing', streamErrors[(-1)].condition)
