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

        self.server.response['headers'] = [
            ('Set-Cookie', 'foo=foo; Domain=.foo.bar; '
                           'Expires=Wed, 13 Jan 2021 22:23:01 GMT;')
        ]

        g.go('http://www.foo.bar:%d' % self.server.port)
        self.assertEqual(dict(g.response.cookies.items()), {'foo': 'foo'})

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