summary refs log tree commit diff
path: root/tests/unittest.py
diff options
context:
space:
mode:
authorAmber Brown <hawkowl@atleastfornow.net>2018-10-30 23:55:43 +1100
committerGitHub <noreply@github.com>2018-10-30 23:55:43 +1100
commit0dce9e1379ea867c9a00c8e6cf1d42badb52601d (patch)
tree941dcf4454a602715d8c2d6728242c8f677a7fce /tests/unittest.py
parentMerge pull request #4109 from matrix-org/erikj/repl_devices (diff)
downloadsynapse-0dce9e1379ea867c9a00c8e6cf1d42badb52601d.tar.xz
Write some tests for the email pusher (#4095)
Diffstat (limited to 'tests/unittest.py')
-rw-r--r--tests/unittest.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/unittest.py b/tests/unittest.py
index a59291cc60..4d40bdb6a5 100644
--- a/tests/unittest.py
+++ b/tests/unittest.py
@@ -146,6 +146,13 @@ def DEBUG(target):
     return target
 
 
+def INFO(target):
+    """A decorator to set the .loglevel attribute to logging.INFO.
+    Can apply to either a TestCase or an individual test method."""
+    target.loglevel = logging.INFO
+    return target
+
+
 class HomeserverTestCase(TestCase):
     """
     A base TestCase that reduces boilerplate for HomeServer-using test cases.
@@ -373,5 +380,5 @@ class HomeserverTestCase(TestCase):
         self.render(request)
         self.assertEqual(channel.code, 200)
 
-        access_token = channel.json_body["access_token"].encode('ascii')
+        access_token = channel.json_body["access_token"]
         return access_token