jjlee / mechanize

Stateful programmatic web browsing in Python, after Andy Lester's Perl module WWW::Mechanize .
http://wwwsearch.sourceforge.net/mechanize/
618 stars 123 forks source link

No equality operator on Cookie #29

Closed jjlee closed 13 years ago

jjlee commented 13 years ago

mtamizi reports that the lack of an equality operator makes it awkward to use pickled cookies in sqlalchemy.

Expect: This is true: mechanize.Cookie(args) == mechanize.Cookie(args) Got: It isn't

Test case using sqlalchemy: (fails with Python 2.7 and sqlalchemy 0.6.3): http://gist.github.com/550319

jjlee commented 13 years ago

Add equality methods to mechanize.Cookie

Also add tests for pickling / unpickling Cookie & CookieJar.

Closed by 0cd23f99d492a9ed3143cc97a3a25f67a1c97460