Example #1
0
 def test_no_dups(self, scores):
     # The inner dict is the recommended addons for addon 7.
     scores.return_value = {7: {1: 5, 2: 3, 3: 4}}
     recs = RecommendedCollection.build_recs([7, 3, 8])
     # 3 should not be in the list since we already have it.
     eq_(recs, [1, 2])
Example #2
0
 def test_build_recs(self):
     eq_(RecommendedCollection.build_recs(self.ids), self.expected_recs())
Example #3
0
 def test_build_recs(self):
     recs = RecommendedCollection.build_recs(self.ids)
     eq_(recs, self.expected_recs())
Example #4
0
 def test_no_dups(self, scores):
     # The inner dict is the recommended addons for addon 7.
     scores.return_value = {7: {1: 5, 2: 3, 3: 4}}
     recs = RecommendedCollection.build_recs([7, 3, 8])
     # 3 should not be in the list since we already have it.
     eq_(recs, [1, 2])
Example #5
0
 def test_build_recs(self):
     eq_(RecommendedCollection.build_recs(self.ids), self.expected_recs())
Example #6
0
 def test_build_recs(self):
     recs = RecommendedCollection.build_recs(self.ids)
     eq_(recs, self.expected_recs())