Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test errors: test_header_set_cookie, test_header_set_on_post, test_https_good_referer, test_https_referer_check_disabled #141

Open
pbsds opened this issue Nov 2, 2023 · 3 comments

Comments

@pbsds
Copy link

pbsds commented Nov 2, 2023

======================================================================
ERROR: test_header_set_cookie (test_seasurf.SeaSurfTestCaseSetCookie.test_header_set_cookie)
Test that the Set-Cookie header was passed on a new request
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/source/test_seasurf.py", line 731, in test_header_set_cookie
    client.cookie_jar.clear()
    ^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'dict_values' object has no attribute 'clear'

======================================================================
ERROR: test_header_set_on_post (test_seasurf.SeaSurfTestCaseSetCookie.test_header_set_on_post)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/source/test_seasurf.py", line 746, in test_header_set_on_post
    if cookie.name == self.csrf._csrf_name:
       ^^^^^^^^^^^
AttributeError: 'Cookie' object has no attribute 'name'

======================================================================
FAIL: test_https_good_referer (test_seasurf.SeaSurfTestCase.test_https_good_referer)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/source/test_seasurf.py", line 156, in test_https_good_referer
    self.assertEqual(rv.status_code, 200)
AssertionError: 403 != 200

======================================================================
FAIL: test_https_referer_check_disabled (test_seasurf.SeaSurfTestCaseReferer.test_https_referer_check_disabled)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/source/test_seasurf.py", line 663, in test_https_referer_check_disabled
    self.assertEqual(200, rv.status_code)
AssertionError: 200 != 403
@amiantos

This comment was marked as off-topic.

@amiantos

This comment was marked as off-topic.

@amiantos
Copy link
Contributor

amiantos commented Nov 9, 2023

I hid my comments as off topic because I learned my upgrade issues were NOT caused by flask-seasurf but by some flask-oauthlib residual code that was wrong, if anyone else lands here, look for headers["Authorization"] = request.authorization and change it to headers["Authorization"] = request.authorization.to_header() because the object type of request.authorization has changed in werkzeug >=2.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants