From ae1ebecc76947606d7c0eef312b55aadffb18f26 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Fri, 2 Apr 2021 07:31:11 -0700 Subject: [PATCH] Fixes tests for suggested/annotated users --- bookwyrm/tests/views/test_helpers.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bookwyrm/tests/views/test_helpers.py b/bookwyrm/tests/views/test_helpers.py index a9dadcad..c646b4b4 100644 --- a/bookwyrm/tests/views/test_helpers.py +++ b/bookwyrm/tests/views/test_helpers.py @@ -247,7 +247,7 @@ class ViewsHelpers(TestCase): ) self.assertFalse(views.helpers.object_visible_to_user(self.local_user, obj)) - def test_get_suggested_users(self, _): + def test_get_annotated_users(self, _): """ list of people you might know """ user_1 = models.User.objects.create_user( "nutria@local.com", @@ -279,7 +279,7 @@ class ViewsHelpers(TestCase): user=user_1, book=self.book, shelf=user_1.shelf_set.first() ) - result = views.helpers.get_suggested_users(self.local_user) + result = views.helpers.get_annotated_users(self.local_user) self.assertEqual(result.count(), 3) self.assertTrue(user_1 in result) self.assertFalse(user_2 in result) @@ -294,7 +294,7 @@ class ViewsHelpers(TestCase): self.assertEqual(remote_user_annotated.mutuals, 0) self.assertEqual(remote_user_annotated.shared_books, 0) - def test_get_suggested_users_counts(self, _): + def test_get_annotated_users_counts(self, _): """ correct counting for multiple shared attributed """ user_1 = models.User.objects.create_user( "nutria@local.com", @@ -330,7 +330,7 @@ class ViewsHelpers(TestCase): user=user_1, book=book, shelf=user_1.shelf_set.first() ) - result = views.helpers.get_suggested_users( + result = views.helpers.get_annotated_users( self.local_user, ~Q(id=self.local_user.id), ~Q(followers=self.local_user),