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

Commit

Permalink
Do not add a delay in tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
clokep committed Aug 24, 2020
1 parent 3f49f74 commit fe503cc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.d/8152.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add support for shadow-banning users (ignoring any message send requests).
4 changes: 3 additions & 1 deletion tests/rest/client/v1/test_rooms.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import json
from urllib import parse as urlparse

from mock import Mock
from mock import Mock, patch

import synapse.rest.admin
from synapse.api.constants import EventContentFields, EventTypes, Membership
Expand Down Expand Up @@ -1976,6 +1976,8 @@ def test_bad_alias(self):
self._set_canonical_alias({"alt_aliases": ["@unknown:test"]}, expected_code=400)


# To avoid the tests timing out don't add a delay to "annoy the requester".
@patch("random.randint", new=lambda a, b: 0)
class ShadowBannedTestCase(unittest.HomeserverTestCase):
servlets = [
synapse.rest.admin.register_servlets_for_client_rest_resource,
Expand Down

0 comments on commit fe503cc

Please sign in to comment.