summary refs log tree commit diff
path: root/tests/http
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2020-12-15 14:51:25 +0000
committerRichard van der Hoff <richard@matrix.org>2020-12-15 22:32:12 +0000
commit7eebe4b3fc3129e4571d58c3cea5eeccc584e072 (patch)
tree3dff8e5f146206d5724162f859491bd22a52f4a9 /tests/http
parentPreparatory refactoring of the SamlHandlerTestCase (#8938) (diff)
downloadsynapse-7eebe4b3fc3129e4571d58c3cea5eeccc584e072.tar.xz
Replace `request.code` with `channel.code`
The two are equivalent, but really we want to check the HTTP result that got
returned to the channel, not the code that the Request object *intended* to
return to the channel.
Diffstat (limited to 'tests/http')
-rw-r--r--tests/http/test_additional_resource.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/http/test_additional_resource.py b/tests/http/test_additional_resource.py
index 05e9c449be..adc318caad 100644
--- a/tests/http/test_additional_resource.py
+++ b/tests/http/test_additional_resource.py
@@ -48,7 +48,7 @@ class AdditionalResourceTests(HomeserverTestCase):
 
         request, channel = make_request(self.reactor, FakeSite(resource), "GET", "/")
 
-        self.assertEqual(request.code, 200)
+        self.assertEqual(channel.code, 200)
         self.assertEqual(channel.json_body, {"some_key": "some_value_async"})
 
     def test_sync(self):
@@ -57,5 +57,5 @@ class AdditionalResourceTests(HomeserverTestCase):
 
         request, channel = make_request(self.reactor, FakeSite(resource), "GET", "/")
 
-        self.assertEqual(request.code, 200)
+        self.assertEqual(channel.code, 200)
         self.assertEqual(channel.json_body, {"some_key": "some_value_sync"})