mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 21:14:52 -04:00
Fix flake8 warnings for tests
This commit is contained in:
parent
24d9f2c140
commit
700487a7c7
39 changed files with 359 additions and 364 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue