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.
This commit is contained in:
Richard van der Hoff 2020-12-15 14:51:25 +00:00
parent 01333681bc
commit 7eebe4b3fc
8 changed files with 22 additions and 22 deletions

View file

@ -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"})