-
-
Notifications
You must be signed in to change notification settings - Fork 264
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bracket-wrap calls to
patch()
for better readability
- Loading branch information
Showing
123 changed files
with
883 additions
and
559 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,9 +31,11 @@ class BaseActivity(TestCase): | |
@classmethod | ||
def setUpTestData(self): # pylint: disable=bad-classmethod-argument | ||
"""we're probably going to re-use this so why copy/paste""" | ||
with patch("bookwyrm.suggested_users.rerank_suggestions_task.delay"), patch( | ||
"bookwyrm.activitystreams.populate_stream_task.delay" | ||
), patch("bookwyrm.lists_stream.populate_lists_task.delay"): | ||
with ( | ||
patch("bookwyrm.suggested_users.rerank_suggestions_task.delay"), | ||
patch("bookwyrm.activitystreams.populate_stream_task.delay"), | ||
patch("bookwyrm.lists_stream.populate_lists_task.delay"), | ||
): | ||
self.user = models.User.objects.create_user( | ||
"mouse", "[email protected]", "mouseword", local=True, localname="mouse" | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,9 +13,11 @@ class Note(TestCase): | |
@classmethod | ||
def setUpTestData(self): # pylint: disable=bad-classmethod-argument | ||
"""create a shared user""" | ||
with patch("bookwyrm.suggested_users.rerank_suggestions_task.delay"), patch( | ||
"bookwyrm.activitystreams.populate_stream_task.delay" | ||
), patch("bookwyrm.lists_stream.populate_lists_task.delay"): | ||
with ( | ||
patch("bookwyrm.suggested_users.rerank_suggestions_task.delay"), | ||
patch("bookwyrm.activitystreams.populate_stream_task.delay"), | ||
patch("bookwyrm.lists_stream.populate_lists_task.delay"), | ||
): | ||
self.user = models.User.objects.create_user( | ||
"mouse", "[email protected]", "mouseword", local=True, localname="mouse" | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,9 +18,11 @@ class Activitystreams(TestCase): | |
@classmethod | ||
def setUpTestData(self): # pylint: disable=bad-classmethod-argument | ||
"""use a test csv""" | ||
with patch("bookwyrm.suggested_users.rerank_suggestions_task.delay"), patch( | ||
"bookwyrm.activitystreams.populate_stream_task.delay" | ||
), patch("bookwyrm.lists_stream.populate_lists_task.delay"): | ||
with ( | ||
patch("bookwyrm.suggested_users.rerank_suggestions_task.delay"), | ||
patch("bookwyrm.activitystreams.populate_stream_task.delay"), | ||
patch("bookwyrm.lists_stream.populate_lists_task.delay"), | ||
): | ||
self.local_user = models.User.objects.create_user( | ||
"mouse", "[email protected]", "password", local=True, localname="mouse" | ||
) | ||
|
@@ -105,9 +107,11 @@ def test_get_activity_stream(self, *_): | |
privacy="direct", | ||
book=self.book, | ||
) | ||
with patch("bookwyrm.activitystreams.r.set"), patch( | ||
"bookwyrm.activitystreams.r.delete" | ||
), patch("bookwyrm.activitystreams.ActivityStream.get_store") as redis_mock: | ||
with ( | ||
patch("bookwyrm.activitystreams.r.set"), | ||
patch("bookwyrm.activitystreams.r.delete"), | ||
patch("bookwyrm.activitystreams.ActivityStream.get_store") as redis_mock, | ||
): | ||
redis_mock.return_value = [status.id, status2.id] | ||
result = self.test_stream.get_activity_stream(self.local_user) | ||
self.assertEqual(result.count(), 2) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,9 +17,11 @@ class Activitystreams(TestCase): | |
@classmethod | ||
def setUpTestData(self): # pylint: disable=bad-classmethod-argument | ||
"""use a test csv""" | ||
with patch("bookwyrm.suggested_users.rerank_suggestions_task.delay"), patch( | ||
"bookwyrm.activitystreams.populate_stream_task.delay" | ||
), patch("bookwyrm.lists_stream.populate_lists_task.delay"): | ||
with ( | ||
patch("bookwyrm.suggested_users.rerank_suggestions_task.delay"), | ||
patch("bookwyrm.activitystreams.populate_stream_task.delay"), | ||
patch("bookwyrm.lists_stream.populate_lists_task.delay"), | ||
): | ||
self.local_user = models.User.objects.create_user( | ||
"mouse", "[email protected]", "password", local=True, localname="mouse" | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,9 +15,11 @@ class Activitystreams(TestCase): | |
@classmethod | ||
def setUpTestData(self): # pylint: disable=bad-classmethod-argument | ||
"""use a test csv""" | ||
with patch("bookwyrm.suggested_users.rerank_suggestions_task.delay"), patch( | ||
"bookwyrm.activitystreams.populate_stream_task.delay" | ||
), patch("bookwyrm.lists_stream.populate_lists_task.delay"): | ||
with ( | ||
patch("bookwyrm.suggested_users.rerank_suggestions_task.delay"), | ||
patch("bookwyrm.activitystreams.populate_stream_task.delay"), | ||
patch("bookwyrm.lists_stream.populate_lists_task.delay"), | ||
): | ||
self.local_user = models.User.objects.create_user( | ||
"mouse", "[email protected]", "password", local=True, localname="mouse" | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,9 +15,11 @@ class Activitystreams(TestCase): | |
@classmethod | ||
def setUpTestData(self): # pylint: disable=bad-classmethod-argument | ||
"""use a test csv""" | ||
with patch("bookwyrm.suggested_users.rerank_suggestions_task.delay"), patch( | ||
"bookwyrm.activitystreams.populate_stream_task.delay" | ||
), patch("bookwyrm.lists_stream.populate_lists_task.delay"): | ||
with ( | ||
patch("bookwyrm.suggested_users.rerank_suggestions_task.delay"), | ||
patch("bookwyrm.activitystreams.populate_stream_task.delay"), | ||
patch("bookwyrm.lists_stream.populate_lists_task.delay"), | ||
): | ||
self.local_user = models.User.objects.create_user( | ||
"mouse", "[email protected]", "password", local=True, localname="mouse" | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,9 +17,11 @@ class ActivitystreamsSignals(TestCase): | |
@classmethod | ||
def setUpTestData(self): # pylint: disable=bad-classmethod-argument | ||
"""use a test csv""" | ||
with patch("bookwyrm.suggested_users.rerank_suggestions_task.delay"), patch( | ||
"bookwyrm.activitystreams.populate_stream_task.delay" | ||
), patch("bookwyrm.lists_stream.populate_lists_task.delay"): | ||
with ( | ||
patch("bookwyrm.suggested_users.rerank_suggestions_task.delay"), | ||
patch("bookwyrm.activitystreams.populate_stream_task.delay"), | ||
patch("bookwyrm.lists_stream.populate_lists_task.delay"), | ||
): | ||
self.local_user = models.User.objects.create_user( | ||
"mouse", "[email protected]", "password", local=True, localname="mouse" | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,9 +10,11 @@ class Activitystreams(TestCase): | |
@classmethod | ||
def setUpTestData(self): # pylint: disable=bad-classmethod-argument | ||
"""use a test csv""" | ||
with patch("bookwyrm.suggested_users.rerank_suggestions_task.delay"), patch( | ||
"bookwyrm.activitystreams.populate_stream_task.delay" | ||
), patch("bookwyrm.lists_stream.populate_lists_task.delay"): | ||
with ( | ||
patch("bookwyrm.suggested_users.rerank_suggestions_task.delay"), | ||
patch("bookwyrm.activitystreams.populate_stream_task.delay"), | ||
patch("bookwyrm.lists_stream.populate_lists_task.delay"), | ||
): | ||
self.local_user = models.User.objects.create_user( | ||
"mouse", "[email protected]", "password", local=True, localname="mouse" | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,9 +25,11 @@ def setUp(self): | |
@classmethod | ||
def setUpTestData(self): # pylint: disable=bad-classmethod-argument | ||
"""populate database""" | ||
with patch("bookwyrm.suggested_users.rerank_suggestions_task.delay"), patch( | ||
"bookwyrm.activitystreams.populate_stream_task.delay" | ||
), patch("bookwyrm.lists_stream.populate_lists_task.delay"): | ||
with ( | ||
patch("bookwyrm.suggested_users.rerank_suggestions_task.delay"), | ||
patch("bookwyrm.activitystreams.populate_stream_task.delay"), | ||
patch("bookwyrm.lists_stream.populate_lists_task.delay"), | ||
): | ||
self.local_user = models.User.objects.create_user( | ||
"mouse", "[email protected]", "password", local=True | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,9 +32,11 @@ def setUp(self): | |
@classmethod | ||
def setUpTestData(self): # pylint: disable=bad-classmethod-argument | ||
"""populate database""" | ||
with patch("bookwyrm.suggested_users.rerank_suggestions_task.delay"), patch( | ||
"bookwyrm.activitystreams.populate_stream_task.delay" | ||
), patch("bookwyrm.lists_stream.populate_lists_task.delay"): | ||
with ( | ||
patch("bookwyrm.suggested_users.rerank_suggestions_task.delay"), | ||
patch("bookwyrm.activitystreams.populate_stream_task.delay"), | ||
patch("bookwyrm.lists_stream.populate_lists_task.delay"), | ||
): | ||
self.local_user = models.User.objects.create_user( | ||
"mouse", "[email protected]", "password", local=True | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,9 +35,11 @@ def setUp(self): | |
@classmethod | ||
def setUpTestData(self): # pylint: disable=bad-classmethod-argument | ||
"""populate database""" | ||
with patch("bookwyrm.suggested_users.rerank_suggestions_task.delay"), patch( | ||
"bookwyrm.activitystreams.populate_stream_task.delay" | ||
), patch("bookwyrm.lists_stream.populate_lists_task.delay"): | ||
with ( | ||
patch("bookwyrm.suggested_users.rerank_suggestions_task.delay"), | ||
patch("bookwyrm.activitystreams.populate_stream_task.delay"), | ||
patch("bookwyrm.lists_stream.populate_lists_task.delay"), | ||
): | ||
self.local_user = models.User.objects.create_user( | ||
"mouse", "[email protected]", "password", local=True | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,9 +34,11 @@ def setUp(self): | |
@classmethod | ||
def setUpTestData(self): # pylint: disable=bad-classmethod-argument | ||
"""populate database""" | ||
with patch("bookwyrm.suggested_users.rerank_suggestions_task.delay"), patch( | ||
"bookwyrm.activitystreams.populate_stream_task.delay" | ||
), patch("bookwyrm.lists_stream.populate_lists_task.delay"): | ||
with ( | ||
patch("bookwyrm.suggested_users.rerank_suggestions_task.delay"), | ||
patch("bookwyrm.activitystreams.populate_stream_task.delay"), | ||
patch("bookwyrm.lists_stream.populate_lists_task.delay"), | ||
): | ||
self.local_user = models.User.objects.create_user( | ||
"mmai", "[email protected]", "password", local=True | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,9 +32,11 @@ def setUp(self): | |
@classmethod | ||
def setUpTestData(self): # pylint: disable=bad-classmethod-argument | ||
"""populate database""" | ||
with patch("bookwyrm.suggested_users.rerank_suggestions_task.delay"), patch( | ||
"bookwyrm.activitystreams.populate_stream_task.delay" | ||
), patch("bookwyrm.lists_stream.populate_lists_task.delay"): | ||
with ( | ||
patch("bookwyrm.suggested_users.rerank_suggestions_task.delay"), | ||
patch("bookwyrm.activitystreams.populate_stream_task.delay"), | ||
patch("bookwyrm.lists_stream.populate_lists_task.delay"), | ||
): | ||
self.local_user = models.User.objects.create_user( | ||
"mouse", "[email protected]", "password", local=True | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,9 +32,11 @@ def setUp(self): | |
@classmethod | ||
def setUpTestData(self): # pylint: disable=bad-classmethod-argument | ||
"""populate database""" | ||
with patch("bookwyrm.suggested_users.rerank_suggestions_task.delay"), patch( | ||
"bookwyrm.activitystreams.populate_stream_task.delay" | ||
), patch("bookwyrm.lists_stream.populate_lists_task.delay"): | ||
with ( | ||
patch("bookwyrm.suggested_users.rerank_suggestions_task.delay"), | ||
patch("bookwyrm.activitystreams.populate_stream_task.delay"), | ||
patch("bookwyrm.lists_stream.populate_lists_task.delay"), | ||
): | ||
self.local_user = models.User.objects.create_user( | ||
"mouse", "[email protected]", "password", local=True | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,9 +11,11 @@ class ListsStreamSignals(TestCase): | |
@classmethod | ||
def setUpTestData(self): # pylint: disable=bad-classmethod-argument | ||
"""database setup""" | ||
with patch("bookwyrm.suggested_users.rerank_suggestions_task.delay"), patch( | ||
"bookwyrm.activitystreams.populate_stream_task.delay" | ||
), patch("bookwyrm.lists_stream.populate_lists_task.delay"): | ||
with ( | ||
patch("bookwyrm.suggested_users.rerank_suggestions_task.delay"), | ||
patch("bookwyrm.activitystreams.populate_stream_task.delay"), | ||
patch("bookwyrm.lists_stream.populate_lists_task.delay"), | ||
): | ||
self.local_user = models.User.objects.create_user( | ||
"mouse", "[email protected]", "password", local=True, localname="mouse" | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,9 +18,11 @@ class ListsStream(TestCase): | |
@classmethod | ||
def setUpTestData(self): # pylint: disable=bad-classmethod-argument | ||
"""database setup""" | ||
with patch("bookwyrm.suggested_users.rerank_suggestions_task.delay"), patch( | ||
"bookwyrm.activitystreams.populate_stream_task.delay" | ||
), patch("bookwyrm.lists_stream.populate_lists_task.delay"): | ||
with ( | ||
patch("bookwyrm.suggested_users.rerank_suggestions_task.delay"), | ||
patch("bookwyrm.activitystreams.populate_stream_task.delay"), | ||
patch("bookwyrm.lists_stream.populate_lists_task.delay"), | ||
): | ||
self.local_user = models.User.objects.create_user( | ||
"mouse", "[email protected]", "password", local=True, localname="mouse" | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,9 +13,11 @@ class Activitystreams(TestCase): | |
@classmethod | ||
def setUpTestData(self): # pylint: disable=bad-classmethod-argument | ||
"""database setup""" | ||
with patch("bookwyrm.suggested_users.rerank_suggestions_task.delay"), patch( | ||
"bookwyrm.activitystreams.populate_stream_task.delay" | ||
), patch("bookwyrm.lists_stream.populate_lists_task.delay"): | ||
with ( | ||
patch("bookwyrm.suggested_users.rerank_suggestions_task.delay"), | ||
patch("bookwyrm.activitystreams.populate_stream_task.delay"), | ||
patch("bookwyrm.lists_stream.populate_lists_task.delay"), | ||
): | ||
self.local_user = models.User.objects.create_user( | ||
"mouse", "[email protected]", "password", local=True, localname="mouse" | ||
) | ||
|
@@ -36,9 +38,10 @@ def setUpTestData(self): # pylint: disable=bad-classmethod-argument | |
inbox="https://example.com/users/rat/inbox", | ||
outbox="https://example.com/users/rat/outbox", | ||
) | ||
with patch( | ||
"bookwyrm.models.activitypub_mixin.broadcast_task.apply_async" | ||
), patch("bookwyrm.lists_stream.remove_list_task.delay"): | ||
with ( | ||
patch("bookwyrm.models.activitypub_mixin.broadcast_task.apply_async"), | ||
patch("bookwyrm.lists_stream.remove_list_task.delay"), | ||
): | ||
self.list = models.List.objects.create( | ||
user=self.local_user, name="hi", privacy="public" | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,9 +15,11 @@ class Activitystreams(TestCase): | |
@classmethod | ||
def setUpTestData(self): # pylint: disable=bad-classmethod-argument | ||
"""we need some stuff""" | ||
with patch("bookwyrm.suggested_users.rerank_suggestions_task.delay"), patch( | ||
"bookwyrm.activitystreams.populate_stream_task.delay" | ||
), patch("bookwyrm.lists_stream.populate_lists_task.delay"): | ||
with ( | ||
patch("bookwyrm.suggested_users.rerank_suggestions_task.delay"), | ||
patch("bookwyrm.activitystreams.populate_stream_task.delay"), | ||
patch("bookwyrm.lists_stream.populate_lists_task.delay"), | ||
): | ||
self.local_user = models.User.objects.create_user( | ||
"mouse", "[email protected]", "password", local=True, localname="mouse" | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,9 +13,11 @@ class Activitystreams(TestCase): | |
@classmethod | ||
def setUpTestData(self): # pylint: disable=bad-classmethod-argument | ||
"""we need some stuff""" | ||
with patch("bookwyrm.suggested_users.rerank_suggestions_task.delay"), patch( | ||
"bookwyrm.activitystreams.populate_stream_task.delay" | ||
), patch("bookwyrm.lists_stream.populate_lists_task.delay"): | ||
with ( | ||
patch("bookwyrm.suggested_users.rerank_suggestions_task.delay"), | ||
patch("bookwyrm.activitystreams.populate_stream_task.delay"), | ||
patch("bookwyrm.lists_stream.populate_lists_task.delay"), | ||
): | ||
self.local_user = models.User.objects.create_user( | ||
"mouse", "[email protected]", "password", local=True, localname="mouse" | ||
) | ||
|
@@ -53,11 +55,10 @@ def test_populate_streams(self, _): | |
user=self.local_user, content="hi", book=self.book | ||
) | ||
|
||
with patch( | ||
"bookwyrm.activitystreams.populate_stream_task.delay" | ||
) as redis_mock, patch( | ||
"bookwyrm.lists_stream.populate_lists_task.delay" | ||
) as list_mock: | ||
with ( | ||
patch("bookwyrm.activitystreams.populate_stream_task.delay") as redis_mock, | ||
patch("bookwyrm.lists_stream.populate_lists_task.delay") as list_mock, | ||
): | ||
populate_streams() | ||
self.assertEqual(redis_mock.call_count, 6) # 2 users x 3 streams | ||
self.assertEqual(list_mock.call_count, 2) # 2 users |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,9 +29,11 @@ class ActivitypubMixins(TestCase): | |
@classmethod | ||
def setUpTestData(self): # pylint: disable=bad-classmethod-argument | ||
"""shared data""" | ||
with patch("bookwyrm.suggested_users.rerank_suggestions_task.delay"), patch( | ||
"bookwyrm.activitystreams.populate_stream_task.delay" | ||
), patch("bookwyrm.lists_stream.populate_lists_task.delay"): | ||
with ( | ||
patch("bookwyrm.suggested_users.rerank_suggestions_task.delay"), | ||
patch("bookwyrm.activitystreams.populate_stream_task.delay"), | ||
patch("bookwyrm.lists_stream.populate_lists_task.delay"), | ||
): | ||
self.local_user = models.User.objects.create_user( | ||
"mouse", "[email protected]", "mouseword", local=True, localname="mouse" | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,9 +17,11 @@ class AutomodModel(TestCase): | |
@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" | ||
), patch("bookwyrm.lists_stream.populate_lists_task.delay"): | ||
with ( | ||
patch("bookwyrm.suggested_users.rerank_suggestions_task.delay"), | ||
patch("bookwyrm.activitystreams.populate_stream_task.delay"), | ||
patch("bookwyrm.lists_stream.populate_lists_task.delay"), | ||
): | ||
self.local_user = models.User.objects.create_user( | ||
"[email protected]", | ||
"[email protected]", | ||
|
Oops, something went wrong.