summary refs log tree commit diff
path: root/tests/test_server.py
diff options
context:
space:
mode:
authorOlivier 'reivilibre <oliverw@matrix.org>2024-07-30 12:42:18 +0100
committerOlivier 'reivilibre <oliverw@matrix.org>2024-07-30 14:27:19 +0100
commitd216a956b6f8b30be09f0b4952504d2d049b30b5 (patch)
tree25290252f04eedc58e144a49033187cd0467f6b4 /tests/test_server.py
parentFix tests relying on headers not being Headers (diff)
downloadsynapse-d216a956b6f8b30be09f0b4952504d2d049b30b5.tar.xz
Slightly simplify some tests whilst reducing 'Any'-typing
Diffstat (limited to 'tests/test_server.py')
-rw-r--r--tests/test_server.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/test_server.py b/tests/test_server.py
index 45015ca653..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 = headers.getRawHeaders(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,7 +414,7 @@ class WrapHtmlRequestHandlerTests(unittest.TestCase):
         )
 
         self.assertEqual(channel.code, 304)
-        headers = channel.result["headers"]
+        headers = channel.headers
         location_headers = headers.getRawHeaders(b"Location", [])
         self.assertEqual(location_headers, [b"/no/over/there"])
         cookies_headers = headers.getRawHeaders(b"Set-Cookie", [])