def test_findAddress(self):
        """
        If there is an IPv4 address for the hostname passed to L{searchFileFor},
        it is returned.
        """
        hosts = self.path()
        hosts.setContent(
            b"10.2.3.4 foo.example.com\n")
        self.assertEqual(
            "10.2.3.4", searchFileFor(hosts.path, b"foo.example.com"))

        If there is an IPv4 address for the hostname passed to L{searchFileFor},
        it is returned.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/names/test/test_hosts.py