mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-07 19:35:03 -04:00
Remove redundant get_success
calls in test code (#12346)
There are a bunch of places we call get_success on an immediate value, which is unnecessary. Let's rip them out, and remove the redundant functionality in get_success and friends.
This commit is contained in:
parent
c4cf916ed7
commit
33ebee47e4
13 changed files with 76 additions and 123 deletions
|
@ -214,9 +214,7 @@ class ServerNoticeTestCase(unittest.HomeserverTestCase):
|
|||
self.assertEqual(messages[0]["sender"], "@notices:test")
|
||||
|
||||
# invalidate cache of server notices room_ids
|
||||
self.get_success(
|
||||
self.server_notices_manager.get_or_create_notice_room_for_user.invalidate_all()
|
||||
)
|
||||
self.server_notices_manager.get_or_create_notice_room_for_user.invalidate_all()
|
||||
|
||||
# send second message
|
||||
channel = self.make_request(
|
||||
|
@ -291,9 +289,7 @@ class ServerNoticeTestCase(unittest.HomeserverTestCase):
|
|||
# invalidate cache of server notices room_ids
|
||||
# if server tries to send to a cached room_id the user gets the message
|
||||
# in old room
|
||||
self.get_success(
|
||||
self.server_notices_manager.get_or_create_notice_room_for_user.invalidate_all()
|
||||
)
|
||||
self.server_notices_manager.get_or_create_notice_room_for_user.invalidate_all()
|
||||
|
||||
# send second message
|
||||
channel = self.make_request(
|
||||
|
@ -380,9 +376,7 @@ class ServerNoticeTestCase(unittest.HomeserverTestCase):
|
|||
|
||||
# invalidate cache of server notices room_ids
|
||||
# if server tries to send to a cached room_id it gives an error
|
||||
self.get_success(
|
||||
self.server_notices_manager.get_or_create_notice_room_for_user.invalidate_all()
|
||||
)
|
||||
self.server_notices_manager.get_or_create_notice_room_for_user.invalidate_all()
|
||||
|
||||
# send second message
|
||||
channel = self.make_request(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue