| |
@@ -144,8 +144,7 @@
|
| |
self.gitrepo = None
|
| |
self.gitrepos = None
|
| |
|
| |
- # pylint: disable=invalid-name
|
| |
- def setUp(self):
|
| |
+ def setUp(self): # pylint: disable=invalid-name
|
| |
""" Set up the environnment, ran before every tests. """
|
| |
# Clean up eventual git repo left in the present folder.
|
| |
self.path = tempfile.mkdtemp(prefix='pagure-tests')
|
| |
@@ -190,8 +189,7 @@
|
| |
# Prevent unit-tests to send email, globally
|
| |
pagure.APP.config['EMAIL_SEND'] = False
|
| |
|
| |
- # pylint: disable=invalid-name
|
| |
- def tearDown(self):
|
| |
+ def tearDown(self): # pylint: disable=invalid-name
|
| |
""" Remove the test.db database if there is one. """
|
| |
self.session.close()
|
| |
|
| |
@@ -209,7 +207,7 @@
|
| |
requests.get('%s/clean/%s' % (FAITOUT_URL, db_name))
|
| |
|
| |
|
| |
- class FakeGroup(object):
|
| |
+ class FakeGroup(object): # pylint: disable=too-few-public-methods
|
| |
""" Fake object used to make the FakeUser object closer to the
|
| |
expectations.
|
| |
"""
|
| |
@@ -222,8 +220,7 @@
|
| |
self.group_type = 'cla'
|
| |
|
| |
|
| |
- # pylint: disable=too-few-public-methods
|
| |
- class FakeUser(object):
|
| |
+ class FakeUser(object): # pylint: disable=too-few-public-methods
|
| |
""" Fake user used to test the fedocallib library. """
|
| |
|
| |
def __init__(self, groups=[], username='username', cla_done=True, id=1):
|
| |
This is the right way to disable pylint messages for a single
line. It's not right to put the disable comment on its own
line directly above the line you want to disable the message
for. A pylint disable comment on its own line disables the
message in that block level - so if the comment is outside
of any class or function, it disables the message for the
entire rest of the file. See:
https://pylint.readthedocs.io/en/latest/faq.html#message-control