

def test_basic(self):
    for url in ('/', '/external', '/test/pants'):
        with RequestContext(self.app, url):
            self.assertEqual(url_for('index'), '/')
    with RequestContext(self.app, headers={
        'Host': 'test.example.com',
    }):
        self.assertEqual(url_for('other_domain'), '/')
    with RequestContext(self.app):
        url.assertEqual(url_for('other_domain'), 'http://test.example.com/')

dataset/ETHPy150Open ecdavis/pants/pants/test/web/test_web_application.py TestUrlFor.test_basic/VarMisuse@93/127 `self`->`url`