'L{cookielib.CookieJar.extract_cookies} extracts cookie information from
fake urllib2 response instances.'

def test_extractCookies(self):

    jar = self.makeCookieJar()[0]
    cookies = dict([(c.name, c) for c in jar])
    cookie = cookies['foo']
    self.assertEqual(cookie.version, 0)
    self.assertEqual(cookie.name, 'foo')
    self.assertEqual(cookie.value, '1')
    self.assertEqual(cookie.path, '/foo')
    self.assertEqual(cookie.comment, 'hello')
    self.assertEqual(cookie.get_nonstandard_attr('cow'), 'moo')
    cookie = cookies['bar']
    self.assertEqual(cookie.version, 0)
    self.assertEqual(cookie.name, 'bar')
    self.assertEqual(cookie.value, '2')
    self.assertEqual(cookie.path, '/')
    self.assertEqual(cookie.comment, 'goodbye')
    self.assertIdentical(cookie.get_nonstandard_attr('cow'), None)
