summary refs log tree commit diff
path: root/tests/rest/client
diff options
context:
space:
mode:
authorreivilibre <oliverw@matrix.org>2024-07-30 15:23:23 +0100
committerOlivier 'reivilibre <oliverw@matrix.org>2024-07-30 17:14:14 +0100
commit8b449a8ce61bce4a231717ab2895db7d6d01a4c6 (patch)
tree7d0539c9396d029b7cf1434cc07f725bf7758350 /tests/rest/client
parentAddress changelog review comments (diff)
downloadsynapse-8b449a8ce61bce4a231717ab2895db7d6d01a4c6.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/rest/client')
-rw-r--r--tests/rest/client/test_login.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/rest/client/test_login.py b/tests/rest/client/test_login.py
index 3fb77fd9dd..2b1e44381b 100644
--- a/tests/rest/client/test_login.py
+++ b/tests/rest/client/test_login.py
@@ -969,9 +969,8 @@ class CASTestCase(unittest.HomeserverTestCase):
         # Test that the response is HTML.
         self.assertEqual(channel.code, 200, channel.result)
         content_type_header_value = ""
-        for header in channel.result.get("headers", []):
-            if header[0] == b"Content-Type":
-                content_type_header_value = header[1].decode("utf8")
+        for header in channel.headers.getRawHeaders("Content-Type", []):
+            content_type_header_value = header
 
         self.assertTrue(content_type_header_value.startswith("text/html"))