'L{KnownHostsFile.hasHostKey} returns C{False} when a key for the given
hostname is not present.'

def test_notPresentKey(self):

    hostsFile = self.loadSampleHostsFile()
    self.assertFalse(hostsFile.hasHostKey('non-existent.example.com', Key.fromString(sampleKey)))
    self.assertTrue(hostsFile.hasHostKey('www.twistedmatrix.com', Key.fromString(sampleKey)))
    self.assertFalse(hostsFile.hasHostKey('www.twistedmatrix.com', Key.fromString(ecdsaSampleKey)))
