'For a given host, get the host key algorithms for that
host in the known_hosts file.'

def test_getHostKeyAlgorithms(self):

    hostsFile = self.loadSampleHostsFile()
    hostsFile.addHostKey('www.twistedmatrix.com', Key.fromString(otherSampleKey))
    hostsFile.addHostKey('www.twistedmatrix.com', Key.fromString(ecdsaSampleKey))
    hostsFile.save()
    options = {}
    options['known-hosts'] = hostsFile.savePath.path
    algorithms = default.getHostKeyAlgorithms('www.twistedmatrix.com', options)
    expectedAlgorithms = ['ssh-rsa', 'ecdsa-sha2-nistp256']
    self.assertEqual(algorithms, expectedAlgorithms)
