summary refs log tree commit diff
path: root/tests/rest/test_health.py
diff options
context:
space:
mode:
authorDirk Klimpel <5740567+dklimpel@users.noreply.github.com>2022-03-03 17:05:44 +0100
committerGitHub <noreply@github.com>2022-03-03 16:05:44 +0000
commit7e91107be1a4287873266e588a3c5b415279f4c8 (patch)
tree521a8c01dd435aaa23e6ea17a39b496b0cf3957a /tests/rest/test_health.py
parentUse the proper serialization format when bundling aggregations. (#12090) (diff)
downloadsynapse-7e91107be1a4287873266e588a3c5b415279f4c8.tar.xz
Add type hints to `tests/rest` (#12146)
* Add type hints to `tests/rest`

* newsfile

* change import from `SigningKey`
Diffstat (limited to 'tests/rest/test_health.py')
-rw-r--r--tests/rest/test_health.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/rest/test_health.py b/tests/rest/test_health.py
index 01d48c3860..da325955f8 100644
--- a/tests/rest/test_health.py
+++ b/tests/rest/test_health.py
@@ -11,7 +11,7 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-
+from http import HTTPStatus
 
 from synapse.rest.health import HealthResource
 
@@ -19,12 +19,12 @@ from tests import unittest
 
 
 class HealthCheckTests(unittest.HomeserverTestCase):
-    def create_test_resource(self):
+    def create_test_resource(self) -> HealthResource:
         # replace the JsonResource with a HealthResource.
         return HealthResource()
 
-    def test_health(self):
+    def test_health(self) -> None:
         channel = self.make_request("GET", "/health", shorthand=False)
 
-        self.assertEqual(channel.code, 200)
+        self.assertEqual(channel.code, HTTPStatus.OK)
         self.assertEqual(channel.result["body"], b"OK")