def test_firstAddress(self):
        """
        The first address associated with the given hostname is returned.
        """
        hosts = self.path()
        hosts.setContent(
            b"::1 foo.example.com\n"
            b"10.1.2.3 foo.example.com\n"
            b"fe80::21b:fcff:feee:5a1d foo.example.com\n")
        self.assertEqual("::1", searchFileFor(hosts.path, b"foo.example.com"))

        The first address associated with the given hostname is returned.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/names/test/test_hosts.py