'The received stream header should have a correct namespace.'

def test_streamStartedWrongNamespace(self):

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