diff options
author | reivilibre <oliverw@matrix.org> | 2024-07-30 15:23:23 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-30 15:23:23 +0100 |
commit | c56b070e6fdc1d3aa3452ea81fd13d0eb9f82aa8 (patch) | |
tree | 288849aca9d50e90b9bdd54490e50fc97874a008 /tests/test_server.py | |
parent | 1.111.0 (diff) | |
download | synapse-c56b070e6fdc1d3aa3452ea81fd13d0eb9f82aa8.tar.xz |
Upgrade locked dependency on Twisted to 24.7.0rc1. (#17502)
I also update the tests and HTTP Proxy code to fix it for this new Twisted release. Pulls in fix for https://github.com/twisted/twisted/security/advisories/GHSA-c8m8-j448-xjx7 Signed-off-by: Olivier 'reivilibre <oliverw@matrix.org>
Diffstat (limited to 'tests/test_server.py')
-rw-r--r-- | tests/test_server.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/test_server.py b/tests/test_server.py index 0910ea5f28..9ff2589497 100644 --- a/tests/test_server.py +++ b/tests/test_server.py @@ -392,8 +392,7 @@ class WrapHtmlRequestHandlerTests(unittest.TestCase): ) self.assertEqual(channel.code, 301) - headers = channel.result["headers"] - location_headers = [v for k, v in headers if k == b"Location"] + location_headers = channel.headers.getRawHeaders(b"Location", []) self.assertEqual(location_headers, [b"/look/an/eagle"]) def test_redirect_exception_with_cookie(self) -> None: @@ -415,10 +414,10 @@ class WrapHtmlRequestHandlerTests(unittest.TestCase): ) self.assertEqual(channel.code, 304) - headers = channel.result["headers"] - location_headers = [v for k, v in headers if k == b"Location"] + headers = channel.headers + location_headers = headers.getRawHeaders(b"Location", []) self.assertEqual(location_headers, [b"/no/over/there"]) - cookies_headers = [v for k, v in headers if k == b"Set-Cookie"] + cookies_headers = headers.getRawHeaders(b"Set-Cookie", []) self.assertEqual(cookies_headers, [b"session=yespls"]) def test_head_request(self) -> None: |