Skip to content

Commit

Permalink
Fixed __eq__ not returning boolean value (#657)
Browse files Browse the repository at this point in the history
  • Loading branch information
pax0r authored and andrewsmedina committed Oct 19, 2018
1 parent fc3c647 commit cec288b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions splinter/driver/djangoclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ def __eq__(self, other_object):
[(key, morsel.value) for key, morsel in self._cookies.items()]
)
return cookies_dict == other_object
return False


class DjangoClient(LxmlDriver):
Expand Down
2 changes: 1 addition & 1 deletion splinter/driver/flaskclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def __eq__(self, other_object):
if isinstance(other_object, dict):
cookies_dict = dict([(c.name, c.value) for c in self._cookies.cookie_jar])
return cookies_dict == other_object

return False

class FlaskClient(LxmlDriver):

Expand Down
2 changes: 2 additions & 0 deletions splinter/driver/webdriver/cookie_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,5 @@ def __eq__(self, other_object):

if isinstance(other_object, dict):
return dict(cookies) == other_object

return False
1 change: 1 addition & 0 deletions splinter/driver/zopetestbrowser.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ def __contains__(self, key):
def __eq__(self, other_object):
if isinstance(other_object, dict):
return dict(self.driver.cookies) == other_object
return False


class ZopeTestBrowser(ElementPresentMixIn, DriverAPI):
Expand Down

0 comments on commit cec288b

Please sign in to comment.