def test_hasKeyMismatch(self):
        hostsFile = self.loadSampleHostsFile()
        exception = self.assertRaises(
            HostKeyChanged, hostsFile.hasHostKey,
            "www.twistedmatrix.com", Key.fromString(otherSampleKey))
        self.assertEqual(exception.offendingEntry, hostsFile._entries[0])
        self.assertEqual(exception.lineno, 1)
        self.assertEqual(exception.path, hostsFile._savePath)
L{KnownHostsFile.hasHostKey} raises L{HostKeyChanged} if the host key
dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/conch/test/test_knownhosts.py/KnownHostsDatabaseTests.test_hasKeyMismatch