diff --git a/requirements/test.txt b/requirements/test.txt index 01abf80c2..76e72a7ac 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -1,5 +1,4 @@ -Flask==2.3.3 -werkzeug==2.3.7 +Flask==3.0.0 coverage==7.3.1 argparse Django>=2.0.6 diff --git a/requirements/test_windows.txt b/requirements/test_windows.txt index 2815d4de3..e1616d52b 100644 --- a/requirements/test_windows.txt +++ b/requirements/test_windows.txt @@ -1,4 +1,4 @@ -Flask==2.3.3 +Flask==3.0.0 coverage==7.3.1 argparse pytest==7.4.2 diff --git a/splinter/driver/flaskclient.py b/splinter/driver/flaskclient.py index 390a46a8e..0eb988f8f 100644 --- a/splinter/driver/flaskclient.py +++ b/splinter/driver/flaskclient.py @@ -36,7 +36,7 @@ def delete_all(self): def all(self, verbose=False): # NOQA: A003 cookies = {} - for cookie in self.driver.cookie_jar: + for cookie in self.driver._cookies.values(): cookies[cookie.key] = cookie.value return cookies @@ -44,14 +44,14 @@ def __getitem__(self, item): return self.driver.get_cookie(item).value def __contains__(self, key): - for cookie in self.driver.cookie_jar: + for cookie in self.driver._cookies.values(): if cookie.key == key: return True return False def __eq__(self, other_object): if isinstance(other_object, dict): - cookies_dict = {c.key: c.value for c in self.driver.cookie_jar} + cookies_dict = {c.key: c.value for c in self.driver._cookies.values()} return cookies_dict == other_object return False diff --git a/tests/test_flaskclient.py b/tests/test_flaskclient.py index b58dec675..c8996f33c 100644 --- a/tests/test_flaskclient.py +++ b/tests/test_flaskclient.py @@ -171,7 +171,7 @@ def test_cookies_extra_parameters(self): """Cookie can be created with extra parameters.""" timestamp = int(time.time() + 120) self.browser.cookies.add({"sha": "zam"}, expires=timestamp) - cookie = {c.key: c for c in self.browser._browser.cookie_jar}["sha"] + cookie = {c.key: c for c in self.browser._browser._cookies.values()}["sha"] assert timestamp == int(cookie.expires.timestamp())