MCPcopy Index your code
hub / github.com/python/cpython / test_is_HDN

Method test_is_HDN

Lib/test/test_http_cookiejar.py:859–867  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

857 self.assertEqual(request_host(req), "www.acme.com")
858
859 def test_is_HDN(self):
860 self.assertTrue(is_HDN("foo.bar.com"))
861 self.assertTrue(is_HDN("1foo2.3bar4.5com"))
862 self.assertFalse(is_HDN("192.168.1.1"))
863 self.assertFalse(is_HDN(""))
864 self.assertFalse(is_HDN("."))
865 self.assertFalse(is_HDN(".foo.bar.com"))
866 self.assertFalse(is_HDN("..foo"))
867 self.assertFalse(is_HDN("foo."))
868
869 def test_reach(self):
870 self.assertEqual(reach("www.acme.com"), ".acme.com")

Callers

nothing calls this directly

Calls 3

is_HDNFunction · 0.90
assertTrueMethod · 0.80
assertFalseMethod · 0.80

Tested by

no test coverage detected