'L{default.verifyHostKey} should return a L{Deferred} which fires with
C{1} when passed a host which matches with an IP is not present in its
known_hosts file, and should also warn the user that it has added the
IP address.'

def test_verifyHostButNotIP(self):

    l = []
    default.verifyHostKey(self.fakeTransport, '8.7.6.5', sampleKey, 'Fingerprint    not    required.').addCallback(l.append)
    self.assertEqual(["Warning:    Permanently    added    the    RSA    host    key    for    IP    address    '8.7.6.5'    to    the    list    of    known    hosts."], self.fakeFile.outchunks)
    self.assertEqual([1], l)
    knownHostsFile = KnownHostsFile.fromPath(FilePath(self.hostsOption))
    self.assertTrue(knownHostsFile.hasHostKey('8.7.6.5', Key.fromString(sampleKey)))
