summary refs log tree commit diff
path: root/tests/unittest.py
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2021-04-27 13:46:16 +0100
committerAndrew Morgan <andrew@amorgan.xyz>2021-04-27 13:46:16 +0100
commit9773abf3d8e1b2711e936ff150d8ae2f48f98be9 (patch)
treeb8c98e96f1262bba37a7ec58bcc7373fdd99a751 /tests/unittest.py
parentMerge remote-tracking branch 'origin/release-v1.32.2' into matrix-org-hotfixes (diff)
parentRemove various bits of compatibility code for Python <3.6 (#9879) (diff)
downloadsynapse-9773abf3d8e1b2711e936ff150d8ae2f48f98be9.tar.xz
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
Diffstat (limited to 'tests/unittest.py')
-rw-r--r--tests/unittest.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/unittest.py b/tests/unittest.py

index d890ad981f..74db7c08f1 100644 --- a/tests/unittest.py +++ b/tests/unittest.py
@@ -18,6 +18,7 @@ import hashlib import hmac import inspect import logging +import secrets import time from typing import Callable, Dict, Iterable, Optional, Tuple, Type, TypeVar, Union from unittest.mock import Mock, patch @@ -133,7 +134,7 @@ class TestCase(unittest.TestCase): def assertObjectHasAttributes(self, attrs, obj): """Asserts that the given object has each of the attributes given, and that the value of each matches according to assertEquals.""" - for (key, value) in attrs.items(): + for key in attrs.keys(): if not hasattr(obj, key): raise AssertionError("Expected obj to have a '.%s'" % key) try: @@ -247,6 +248,8 @@ class HomeserverTestCase(TestCase): config=self.hs.config.server.listeners[0], resource=self.resource, server_version_string="1", + max_request_body_size=1234, + reactor=self.reactor, ) from tests.rest.client.v1.utils import RestHelper @@ -624,7 +627,6 @@ class HomeserverTestCase(TestCase): str: The new event's ID. """ event_creator = self.hs.get_event_creation_handler() - secrets = self.hs.get_secrets() requester = create_requester(user) event, context = self.get_success(