fix test failures
This commit is contained in:
@@ -113,10 +113,10 @@ class ResourceLimitsServerNotices(object):
|
||||
self._remove_limit_block_notification(user_id, ref_events)
|
||||
return
|
||||
|
||||
if currently_blocked and not limit_type:
|
||||
if currently_blocked and not limit_msg:
|
||||
# Room is notifying of a block, when it ought not to be.
|
||||
yield self._remove_limit_block_notification(user_id, ref_events)
|
||||
elif not currently_blocked and limit_type:
|
||||
elif not currently_blocked and limit_msg:
|
||||
# Room is not notifying of a block, when it ought to be.
|
||||
yield self._apply_limit_block_notification(
|
||||
user_id, limit_msg, limit_type
|
||||
|
||||
@@ -133,7 +133,7 @@ class TestResourceLimitsServerNotices(unittest.HomeserverTestCase):
|
||||
self.get_success(self._rlsn.maybe_send_server_notice_to_user(self.user_id))
|
||||
|
||||
# Would be better to check contents, but 2 calls == set blocking event
|
||||
self.assertTrue(self._send_notice.call_count == 2)
|
||||
self.assertEqual(self._send_notice.call_count, 2)
|
||||
|
||||
def test_maybe_send_server_notice_to_user_add_blocked_notice_noop(self):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user