'Test addressing when initiating a stream.'

def test_sendHeaderInitiating(self):

    xs = self.xmlstream
    xs.thisEntity = jid.JID('thisHost')
    xs.otherEntity = jid.JID('otherHost')
    xs.initiating = True
    xs.sendHeader()
    splitHeader = xs.transport.value()[0:(-1)].split('    ')
    self.assertIn("to='otherhost'", splitHeader)
    self.assertIn("from='thishost'", splitHeader)
