

def test_prePathURLHost(self):
    "\n        Verify that L{FakeRequest.prePathURL} will turn the C{Host} header of\n        the request into the netloc of the returned URL, if it's present.\n        "
    req = FakeRequest(currentSegments=['a', 'b'], uri='/a/b/c/', headers={
        'host': 'foo.bar',
    })
    self.assertEqual(req.prePathURL(), 'http://foo.bar/a/b')

dataset/ETHPy150Open twisted/nevow/nevow/test/test_testutil.py TestFakeRequest.test_prePathURLHost/original