mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2025-01-02 05:18:43 +00:00
Tests searching for users on blocked servers
This commit is contained in:
parent
1903812b1d
commit
89d3c3e82b
1 changed files with 9 additions and 0 deletions
|
@ -146,6 +146,15 @@ class ViewsHelpers(TestCase):
|
||||||
self.assertIsInstance(result, models.User)
|
self.assertIsInstance(result, models.User)
|
||||||
self.assertEqual(result.username, "mouse@example.com")
|
self.assertEqual(result.username, "mouse@example.com")
|
||||||
|
|
||||||
|
def test_user_on_blocked_server(self, _):
|
||||||
|
""" find a remote user using webfinger """
|
||||||
|
models.FederatedServer.objects.create(
|
||||||
|
server_name="example.com", status="blocked"
|
||||||
|
)
|
||||||
|
|
||||||
|
result = views.helpers.handle_remote_webfinger("@mouse@example.com")
|
||||||
|
self.assertIsNone(result)
|
||||||
|
|
||||||
def test_handle_reading_status_to_read(self, _):
|
def test_handle_reading_status_to_read(self, _):
|
||||||
""" posts shelve activities """
|
""" posts shelve activities """
|
||||||
shelf = self.local_user.shelf_set.get(identifier="to-read")
|
shelf = self.local_user.shelf_set.get(identifier="to-read")
|
||||||
|
|
Loading…
Reference in a new issue