mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-11-13 12:51:01 -05:00
Have all unit tests import from our own subclass of trial's unittest TestCase; set up logging in ONE PLACE ONLY
This commit is contained in:
parent
958b52596c
commit
cd62ee3f29
21 changed files with 52 additions and 61 deletions
|
|
@ -14,7 +14,7 @@
|
|||
# limitations under the License.
|
||||
|
||||
""" Tests REST events for /events paths."""
|
||||
from twisted.trial import unittest
|
||||
from tests import unittest
|
||||
|
||||
# twisted imports
|
||||
from twisted.internet import defer
|
||||
|
|
@ -27,14 +27,12 @@ from synapse.server import HomeServer
|
|||
|
||||
# python imports
|
||||
import json
|
||||
import logging
|
||||
|
||||
from ..utils import MockHttpResource, MemoryDataStore
|
||||
from .utils import RestTestCase
|
||||
|
||||
from mock import Mock, NonCallableMock
|
||||
|
||||
logging.getLogger().addHandler(logging.NullHandler())
|
||||
|
||||
PATH_PREFIX = "/_matrix/client/api/v1"
|
||||
|
||||
|
|
|
|||
|
|
@ -15,11 +15,10 @@
|
|||
|
||||
"""Tests REST events for /presence paths."""
|
||||
|
||||
from twisted.trial import unittest
|
||||
from tests import unittest
|
||||
from twisted.internet import defer
|
||||
|
||||
from mock import Mock
|
||||
import logging
|
||||
|
||||
from ..utils import MockHttpResource
|
||||
|
||||
|
|
@ -28,9 +27,6 @@ from synapse.handlers.presence import PresenceHandler
|
|||
from synapse.server import HomeServer
|
||||
|
||||
|
||||
logging.getLogger().addHandler(logging.NullHandler())
|
||||
|
||||
|
||||
OFFLINE = PresenceState.OFFLINE
|
||||
UNAVAILABLE = PresenceState.UNAVAILABLE
|
||||
ONLINE = PresenceState.ONLINE
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
"""Tests REST events for /profile paths."""
|
||||
|
||||
from twisted.trial import unittest
|
||||
from tests import unittest
|
||||
from twisted.internet import defer
|
||||
|
||||
from mock import Mock
|
||||
|
|
@ -28,6 +28,7 @@ from synapse.server import HomeServer
|
|||
myid = "@1234ABCD:test"
|
||||
PATH_PREFIX = "/_matrix/client/api/v1"
|
||||
|
||||
|
||||
class ProfileTestCase(unittest.TestCase):
|
||||
""" Tests profile management. """
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
from twisted.internet import defer
|
||||
|
||||
# trial imports
|
||||
from twisted.trial import unittest
|
||||
from tests import unittest
|
||||
|
||||
from synapse.api.constants import Membership
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue