Disable comically inefficient book count comparisons
Oops! Hopefully I can restore these in a way that doesn't break at even a moderate scale
This commit is contained in:
@ -29,7 +29,7 @@ class SuggestedUsers(TestCase):
|
||||
Mock = namedtuple("AnnotatedUserMock", ("mutuals", "shared_books"))
|
||||
annotated_user_mock = Mock(3, 27)
|
||||
rank = suggested_users.get_rank(annotated_user_mock)
|
||||
self.assertEqual(rank, 3.9642857142857144)
|
||||
self.assertEqual(rank, 3) # 3.9642857142857144)
|
||||
|
||||
def test_store_id(self, *_):
|
||||
"""redis key generation"""
|
||||
@ -42,7 +42,7 @@ class SuggestedUsers(TestCase):
|
||||
"""reverse the rank computation to get the mutuals and shared books counts"""
|
||||
counts = suggested_users.get_counts_from_rank(3.9642857142857144)
|
||||
self.assertEqual(counts["mutuals"], 3)
|
||||
self.assertEqual(counts["shared_books"], 27)
|
||||
# self.assertEqual(counts["shared_books"], 27)
|
||||
|
||||
def test_get_objects_for_store(self, *_):
|
||||
"""list of people to follow for a given user"""
|
||||
@ -126,7 +126,7 @@ class SuggestedUsers(TestCase):
|
||||
|
||||
user_1_annotated = result.get(id=user_1.id)
|
||||
self.assertEqual(user_1_annotated.mutuals, 1)
|
||||
self.assertEqual(user_1_annotated.shared_books, 1)
|
||||
# self.assertEqual(user_1_annotated.shared_books, 1)
|
||||
|
||||
def test_get_annotated_users_counts(self, *_):
|
||||
"""correct counting for multiple shared attributed"""
|
||||
|
Reference in New Issue
Block a user