'For a host with a canonical name and one or more aliases,
L{searchFileFor} can find an address given any of the names.'

def test_searchFileForAliases(self):

    hosts = self.path()
    hosts.setContent('127.0.1.1 DCTB helmut.example.org DCTB helmut\n#    a    comment\n::1    localhost    ip6-localhost    ip6-loopback\n')
    self.assertEqual(searchFileFor(hosts.path, 'helmut'), '127.0.1.1')
    self.assertEqual(searchFileFor(hosts.path, 'helmut.example.org'), '127.0.1.1')
    self.assertEqual(searchFileFor(hosts.path, 'ip6-localhost'), '::1')
    self.assertEqual(searchFileFor(hosts.path, 'ip6-loopback'), '::1')
    self.assertEqual(searchFileFor(hosts.path, 'localhost'), '::1')
