'When creating a cookie with a port directive, it won\'t be added to the
L{cookie.CookieJar} if the URI is on a different port.'

def test_portCookieOnWrongPort(self):

    uri = 'http://example.com:4567/foo?bar'
    cookie = 'foo=1;port=1234'
    cookieJar = cookielib.CookieJar()
    self.addCookies(cookieJar, uri, [cookie])
    self.assertEqual(len(list(cookieJar)), 0)
