Пример #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])
Пример #2
0
 def test_build_recs(self):
     eq_(RecommendedCollection.build_recs(self.ids), self.expected_recs())
Пример #3
0
 def test_build_recs(self):
     recs = RecommendedCollection.build_recs(self.ids)
     eq_(recs, self.expected_recs())
Пример #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])
Пример #5
0
 def test_build_recs(self):
     eq_(RecommendedCollection.build_recs(self.ids), self.expected_recs())
Пример #6
0
 def test_build_recs(self):
     recs = RecommendedCollection.build_recs(self.ids)
     eq_(recs, self.expected_recs())