'Verifying a key where the host is present (and correct), but the IP is
present and different, should result the deferred firing in a
HostKeyChanged failure.'

def test_verifyHostIPMismatch(self):

    hostsFile = self.loadSampleHostsFile()
    wrongKey = Key.fromString(thirdSampleKey)
    ui = FakeUI()
    d = hostsFile.verifyHostKey(ui, 'www.twistedmatrix.com', '4.3.2.1', wrongKey)
    return self.assertFailure(d, HostKeyChanged)
