summary refs log tree commit diff
path: root/tests/unittest.py
diff options
context:
space:
mode:
authorMatthew Hodgson <matthew@matrix.org>2016-03-27 22:54:42 +0100
committerMatthew Hodgson <matthew@matrix.org>2016-03-27 22:54:42 +0100
commitd9d48aad2d58deb5db422a5373a4dac9334a0618 (patch)
tree63e51372ca9ace4971403928bd46440ff9e455e2 /tests/unittest.py
parentinitial WIP of a tentative preview_url endpoint - incomplete, untested, exper... (diff)
parenttypo (diff)
downloadsynapse-d9d48aad2d58deb5db422a5373a4dac9334a0618.tar.xz
Merge branch 'develop' into matthew/preview_urls
Diffstat (limited to 'tests/unittest.py')
-rw-r--r--tests/unittest.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/unittest.py b/tests/unittest.py
index 6f02eb4cac..5b22abfe74 100644
--- a/tests/unittest.py
+++ b/tests/unittest.py
@@ -37,9 +37,12 @@ def around(target):
     def _around(code):
         name = code.__name__
         orig = getattr(target, name)
+
         def new(*args, **kwargs):
             return code(orig, *args, **kwargs)
+
         setattr(target, name, new)
+
     return _around
 
 
@@ -53,9 +56,7 @@ class TestCase(unittest.TestCase):
 
         method = getattr(self, methodName)
 
-        level = getattr(method, "loglevel",
-                    getattr(self, "loglevel",
-                        NEVER))
+        level = getattr(method, "loglevel", getattr(self, "loglevel", NEVER))
 
         @around(self)
         def setUp(orig):