Use setUpTestData() to speed up tests
Pylint's `bad-classmethod-argument` is disabled for each definition to avoid rewriting the method bodies just to rename `self` → `cls`. This can be done gradually, as the setUpTestData methods are modified along the way.
This commit is contained in:
parent
cf1afefc84
commit
9d502f5ee2
129 changed files with 644 additions and 327 deletions
|
@ -12,7 +12,8 @@ from bookwyrm import models, settings
|
|||
class SiteModels(TestCase):
|
||||
"""tests for site models"""
|
||||
|
||||
def setUp(self):
|
||||
@classmethod
|
||||
def setUpTestData(self): # pylint: disable=bad-classmethod-argument
|
||||
"""we need basic test data and mocks"""
|
||||
with patch("bookwyrm.suggested_users.rerank_suggestions_task.delay"), patch(
|
||||
"bookwyrm.activitystreams.populate_stream_task.delay"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue