diff options
Diffstat (limited to 'tests/handlers')
-rw-r--r-- | tests/handlers/test_directory.py | 6 | ||||
-rw-r--r-- | tests/handlers/test_federation.py | 6 | ||||
-rw-r--r-- | tests/handlers/test_presence.py | 7 | ||||
-rw-r--r-- | tests/handlers/test_presencelike.py | 6 | ||||
-rw-r--r-- | tests/handlers/test_profile.py | 6 | ||||
-rw-r--r-- | tests/handlers/test_room.py | 6 | ||||
-rw-r--r-- | tests/handlers/test_typing.py | 6 |
7 files changed, 7 insertions, 36 deletions
diff --git a/tests/handlers/test_directory.py b/tests/handlers/test_directory.py index f7eb7b4f03..dd5d85dde6 100644 --- a/tests/handlers/test_directory.py +++ b/tests/handlers/test_directory.py @@ -14,11 +14,10 @@ # limitations under the License. -from twisted.trial import unittest +from tests import unittest from twisted.internet import defer from mock import Mock -import logging from synapse.server import HomeServer from synapse.http.client import HttpClient @@ -28,9 +27,6 @@ from synapse.storage.directory import RoomAliasMapping from tests.utils import SQLiteMemoryDbPool -logging.getLogger().addHandler(logging.NullHandler()) - - class DirectoryHandlers(object): def __init__(self, hs): self.directory_handler = DirectoryHandler(hs) diff --git a/tests/handlers/test_federation.py b/tests/handlers/test_federation.py index 6fc3d8f7fd..f0308a29d3 100644 --- a/tests/handlers/test_federation.py +++ b/tests/handlers/test_federation.py @@ -14,7 +14,7 @@ from twisted.internet import defer -from twisted.trial import unittest +from tests import unittest from synapse.api.events.room import ( InviteJoinEvent, MessageEvent, RoomMemberEvent @@ -26,12 +26,8 @@ from synapse.federation.units import Pdu from mock import NonCallableMock, ANY -import logging - from ..utils import get_mock_call_args -logging.getLogger().addHandler(logging.NullHandler()) - class FederationTestCase(unittest.TestCase): diff --git a/tests/handlers/test_presence.py b/tests/handlers/test_presence.py index d57ee563c4..aa52a15b6c 100644 --- a/tests/handlers/test_presence.py +++ b/tests/handlers/test_presence.py @@ -14,11 +14,10 @@ # limitations under the License. -from twisted.trial import unittest +from tests import unittest from twisted.internet import defer, reactor from mock import Mock, call, ANY -import logging import json from tests.utils import ( @@ -36,9 +35,6 @@ UNAVAILABLE = PresenceState.UNAVAILABLE ONLINE = PresenceState.ONLINE -logging.getLogger().addHandler(logging.NullHandler()) - - def _expect_edu(destination, edu_type, content, origin="test"): return { "origin": origin, @@ -85,7 +81,6 @@ class PresenceStateTestCase(unittest.TestCase): # Mock the RoomMemberHandler room_member_handler = Mock(spec=[]) hs.handlers.room_member_handler = room_member_handler - logging.getLogger().debug("Mocking room_member_handler=%r", room_member_handler) # Some local users to test with self.u_apple = hs.parse_userid("@apple:test") diff --git a/tests/handlers/test_presencelike.py b/tests/handlers/test_presencelike.py index b35980d948..72c55b3667 100644 --- a/tests/handlers/test_presencelike.py +++ b/tests/handlers/test_presencelike.py @@ -16,11 +16,10 @@ """This file contains tests of the "presence-like" data that is shared between presence and profiles; namely, the displayname and avatar_url.""" -from twisted.trial import unittest +from tests import unittest from twisted.internet import defer from mock import Mock, call, ANY -import logging from ..utils import MockClock @@ -35,9 +34,6 @@ UNAVAILABLE = PresenceState.UNAVAILABLE ONLINE = PresenceState.ONLINE -logging.getLogger().addHandler(logging.NullHandler()) - - class MockReplication(object): def __init__(self): self.edu_handlers = {} diff --git a/tests/handlers/test_profile.py b/tests/handlers/test_profile.py index 63c9295944..f95ddd7018 100644 --- a/tests/handlers/test_profile.py +++ b/tests/handlers/test_profile.py @@ -14,11 +14,10 @@ # limitations under the License. -from twisted.trial import unittest +from tests import unittest from twisted.internet import defer from mock import Mock -import logging from synapse.api.errors import AuthError from synapse.server import HomeServer @@ -27,9 +26,6 @@ from synapse.handlers.profile import ProfileHandler from tests.utils import SQLiteMemoryDbPool -logging.getLogger().addHandler(logging.NullHandler()) - - class ProfileHandlers(object): def __init__(self, hs): self.profile_handler = ProfileHandler(hs) diff --git a/tests/handlers/test_room.py b/tests/handlers/test_room.py index 5687bbea0b..a1a2e80492 100644 --- a/tests/handlers/test_room.py +++ b/tests/handlers/test_room.py @@ -15,7 +15,7 @@ from twisted.internet import defer -from twisted.trial import unittest +from tests import unittest from synapse.api.events.room import ( InviteJoinEvent, RoomMemberEvent, RoomConfigEvent @@ -27,10 +27,6 @@ from synapse.server import HomeServer from mock import Mock, NonCallableMock -import logging - -logging.getLogger().addHandler(logging.NullHandler()) - class RoomMemberHandlerTestCase(unittest.TestCase): diff --git a/tests/handlers/test_typing.py b/tests/handlers/test_typing.py index 6532ac94a3..ab908cdfc1 100644 --- a/tests/handlers/test_typing.py +++ b/tests/handlers/test_typing.py @@ -14,12 +14,11 @@ # limitations under the License. -from twisted.trial import unittest +from tests import unittest from twisted.internet import defer from mock import Mock, call, ANY import json -import logging from ..utils import MockHttpResource, MockClock, DeferredMockCallable @@ -27,9 +26,6 @@ from synapse.server import HomeServer from synapse.handlers.typing import TypingNotificationHandler -logging.getLogger().addHandler(logging.NullHandler()) - - def _expect_edu(destination, edu_type, content, origin="test"): return { "origin": origin, |