Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Move to more concise assertion method for the usage
Browse files Browse the repository at this point in the history
  • Loading branch information
MadLittleMods committed Oct 8, 2021
1 parent 6523234 commit 8d2025c
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tests/handlers/test_user_directory.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ def test_handle_local_profile_change_with_support_user(self) -> None:
)
)
profile = self.get_success(self.store.get_user_in_directory(support_user_id))
self.assertTrue(profile is None)
self.assertIsNone(profile)
display_name = "display_name"

profile_info = ProfileInfo(avatar_url="avatar_url", display_name=display_name)
Expand Down Expand Up @@ -264,7 +264,7 @@ def test_handle_local_profile_change_with_deactivated_user(self) -> None:

# profile is not in directory
profile = self.get_success(self.store.get_user_in_directory(r_user_id))
self.assertTrue(profile is None)
self.assertIsNone(profile)

# update profile after deactivation
self.get_success(
Expand All @@ -273,7 +273,7 @@ def test_handle_local_profile_change_with_deactivated_user(self) -> None:

# profile is furthermore not in directory
profile = self.get_success(self.store.get_user_in_directory(r_user_id))
self.assertTrue(profile is None)
self.assertIsNone(profile)

def test_handle_local_profile_change_with_appservice_user(self) -> None:
# create user
Expand All @@ -283,7 +283,7 @@ def test_handle_local_profile_change_with_appservice_user(self) -> None:

# profile is not in directory
profile = self.get_success(self.store.get_user_in_directory(as_user_id))
self.assertTrue(profile is None)
self.assertIsNone(profile)

# update profile
profile_info = ProfileInfo(avatar_url="avatar_url", display_name="4L1c3")
Expand All @@ -293,14 +293,14 @@ def test_handle_local_profile_change_with_appservice_user(self) -> None:

# profile is still not in directory
profile = self.get_success(self.store.get_user_in_directory(as_user_id))
self.assertTrue(profile is None)
self.assertIsNone(profile)

def test_handle_local_profile_change_with_appservice_sender(self) -> None:
# profile is not in directory
profile = self.get_success(
self.store.get_user_in_directory(self.appservice.sender)
)
self.assertTrue(profile is None)
self.assertIsNone(profile)

# update profile
profile_info = ProfileInfo(avatar_url="avatar_url", display_name="4L1c3")
Expand All @@ -314,7 +314,7 @@ def test_handle_local_profile_change_with_appservice_sender(self) -> None:
profile = self.get_success(
self.store.get_user_in_directory(self.appservice.sender)
)
self.assertTrue(profile is None)
self.assertIsNone(profile)

def test_handle_user_deactivated_support_user(self) -> None:
s_user_id = "@support:test"
Expand Down

0 comments on commit 8d2025c

Please sign in to comment.