summary refs log tree commit diff
path: root/tests/test_server.py
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2020-07-28 10:15:22 +0100
committerRichard van der Hoff <richard@matrix.org>2020-07-28 10:15:22 +0100
commitb2ccc72a00dd234432226b9cae6aee2223a2eef8 (patch)
tree4e53a71c1de7245a79c67c441534d2757a4e54d6 /tests/test_server.py
parentMerge branch 'develop' into matrix-org-hotfixes (diff)
parentHandle replication commands synchronously where possible (#7876) (diff)
downloadsynapse-b2ccc72a00dd234432226b9cae6aee2223a2eef8.tar.xz
Merge branch 'release-v1.18.0' into matrix-org-hotfixes
Diffstat (limited to 'tests/test_server.py')
-rw-r--r--tests/test_server.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/test_server.py b/tests/test_server.py

index 42cada8964..073b2362cc 100644 --- a/tests/test_server.py +++ b/tests/test_server.py
@@ -193,10 +193,10 @@ class OptionsResourceTests(unittest.TestCase): return channel def test_unknown_options_request(self): - """An OPTIONS requests to an unknown URL still returns 200 OK.""" + """An OPTIONS requests to an unknown URL still returns 204 No Content.""" channel = self._make_request(b"OPTIONS", b"/foo/") - self.assertEqual(channel.result["code"], b"200") - self.assertEqual(channel.result["body"], b"{}") + self.assertEqual(channel.result["code"], b"204") + self.assertNotIn("body", channel.result) # Ensure the correct CORS headers have been added self.assertTrue( @@ -213,10 +213,10 @@ class OptionsResourceTests(unittest.TestCase): ) def test_known_options_request(self): - """An OPTIONS requests to an known URL still returns 200 OK.""" + """An OPTIONS requests to an known URL still returns 204 No Content.""" channel = self._make_request(b"OPTIONS", b"/res/") - self.assertEqual(channel.result["code"], b"200") - self.assertEqual(channel.result["body"], b"{}") + self.assertEqual(channel.result["code"], b"204") + self.assertNotIn("body", channel.result) # Ensure the correct CORS headers have been added self.assertTrue(