From 867f141c673868ec216a2803914c97652be03cd2 Mon Sep 17 00:00:00 2001 From: dklimpel <5740567+dklimpel@users.noreply.github.com> Date: Fri, 14 Apr 2023 06:52:59 +0200 Subject: [PATCH 1/2] Convert async to normal tests in `TestSSOHandler` --- tests/handlers/test_sso.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/handlers/test_sso.py b/tests/handlers/test_sso.py index d6f43a98fcda..620ae3a4ba54 100644 --- a/tests/handlers/test_sso.py +++ b/tests/handlers/test_sso.py @@ -35,7 +35,7 @@ def make_homeserver(self, reactor: MemoryReactor, clock: Clock) -> HomeServer: ) return hs - async def test_set_avatar(self) -> None: + def test_set_avatar(self) -> None: """Tests successfully setting the avatar of a newly created user""" handler = self.hs.get_sso_handler() @@ -54,7 +54,7 @@ async def test_set_avatar(self) -> None: self.assertIsNot(profile["avatar_url"], None) @unittest.override_config({"max_avatar_size": 1}) - async def test_set_avatar_too_big_image(self) -> None: + def test_set_avatar_too_big_image(self) -> None: """Tests that saving an avatar fails when it is too big""" handler = self.hs.get_sso_handler() @@ -66,7 +66,7 @@ async def test_set_avatar_too_big_image(self) -> None: ) @unittest.override_config({"allowed_avatar_mimetypes": ["image/jpeg"]}) - async def test_set_avatar_incorrect_mime_type(self) -> None: + def test_set_avatar_incorrect_mime_type(self) -> None: """Tests that saving an avatar fails when its mime type is not allowed""" handler = self.hs.get_sso_handler() @@ -77,7 +77,7 @@ async def test_set_avatar_incorrect_mime_type(self) -> None: self.get_success(handler.set_avatar(user_id, "http://my.server/me.png")) ) - async def test_skip_saving_avatar_when_not_changed(self) -> None: + def test_skip_saving_avatar_when_not_changed(self) -> None: """Tests whether saving of avatar correctly skips if the avatar hasn't changed""" handler = self.hs.get_sso_handler() From 55ade074fa8eeb81048aec128e2726a1d00701bf Mon Sep 17 00:00:00 2001 From: dklimpel <5740567+dklimpel@users.noreply.github.com> Date: Fri, 14 Apr 2023 07:17:27 +0200 Subject: [PATCH 2/2] newsfile --- changelog.d/15433.misc | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/15433.misc diff --git a/changelog.d/15433.misc b/changelog.d/15433.misc new file mode 100644 index 000000000000..f1d83506bcd9 --- /dev/null +++ b/changelog.d/15433.misc @@ -0,0 +1 @@ +Convert async to normal tests in `TestSSOHandler`. \ No newline at end of file