@exclude_transport('urllib3')
    def test_common_case_www_domain(self):
        g = build_grab()
        names = [
            'www.foo.bar:%d:127.0.0.1' % self.server.port,
        ]
        g.transport.curl.setopt(pycurl.RESOLVE, names)

        # Cookies are set for root domain (not for www subdomain)
        self.server.response['headers'] = [
            ('Set-Cookie', 'foo=1; Domain=foo.bar;'),
            ('Set-Cookie', 'bar=2; Domain=.foo.bar;'),
        ]

        # get cookies
        g.go('http://www.foo.bar:%d' % self.server.port)
        # submit cookies
        g.go('http://www.foo.bar:%d' % self.server.port)
        self.assertEqual('1', self.server.request['cookies'].get('foo').value)
        self.assertEqual('2', self.server.request['cookies'].get('bar').value)
dataset/ETHPy150Open lorien/grab/test/grab_cookies.py/TestCookies.test_common_case_www_domain/original