Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/15433.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Convert async to normal tests in `TestSSOHandler`.
8 changes: 4 additions & 4 deletions tests/handlers/test_sso.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand All @@ -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()

Expand All @@ -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()

Expand All @@ -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()
Expand Down