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

@ -27,5 +27,5 @@ class HealthCheckTests(unittest.HomeserverTestCase):
def test_health(self):
request, channel = self.make_request("GET", "/health", shorthand=False)
self.assertEqual(request.code, 200)
self.assertEqual(channel.code, 200)
self.assertEqual(channel.result["body"], b"OK")