Did I find the right examples for you? yes no

All Samples(42)  |  Call(42)  |  Derive(0)  |  Import(0)

src/d/j/django-lfs-0.7.7/lfs/portlet/models/topseller.py   django-lfs(Download)
            category = object.get_current_category(context.get("request"))
            topseller = lfs.marketing.utils.get_topseller_for_category(
                category, self.limit)
        else:
            topseller = lfs.marketing.utils.get_topseller_for_category(
                object, self.limit)

src/d/j/django-lfs-HEAD/lfs/portlet/models/topseller.py   django-lfs(Download)
            category = object.get_current_category(context.get("request"))
            topseller = lfs.marketing.utils.get_topseller_for_category(
                category, self.limit)
        else:
            topseller = lfs.marketing.utils.get_topseller_for_category(
                object, self.limit)

src/l/f/lfs-HEAD/portlet/models/topseller.py   lfs(Download)
                context.get("request"), object)
            topseller = lfs.marketing.utils.get_topseller_for_category(
                category, self.limit)            
        else:
            topseller = lfs.marketing.utils.get_topseller_for_category(
                object, self.limit)

src/d/j/django-lfs-0.7.7/lfs/marketing/tests.py   django-lfs(Download)
    def test_topseller_for_category_1(self):
        """Tests topseller for specific categories.
        """
        # Tests the top level category
        ts = lfs.marketing.utils.get_topseller_for_category(self.c1, limit=2)
 
        # Tests the direct categories
        ts = lfs.marketing.utils.get_topseller_for_category(self.c11, limit=1)
        self.assertEqual(len(ts), 1)
 
        self.assertEqual(ts[0], self.p2)
 
        ts = lfs.marketing.utils.get_topseller_for_category(self.c12, limit=1)
 
        # Tests the top level category
        ts = lfs.marketing.utils.get_topseller_for_category(self.c1, limit=2)
        self.assertEqual(len(ts), 2)
 
        self.assertEqual(ts[0], self.p5)
        self.assertEqual(ts[1], self.p4)
 
        # Tests the direct categories
        ts = lfs.marketing.utils.get_topseller_for_category(self.c11, limit=2)

src/d/j/django-lfs-HEAD/lfs/marketing/tests.py   django-lfs(Download)
    def test_topseller_for_category_1(self):
        """Tests topseller for specific categories.
        """
        # Tests the top level category
        ts = lfs.marketing.utils.get_topseller_for_category(self.c1, limit=2)
 
        # Tests the direct categories
        ts = lfs.marketing.utils.get_topseller_for_category(self.c11, limit=1)
        self.assertEqual(len(ts), 1)
 
        self.assertEqual(ts[0], self.p2)
 
        ts = lfs.marketing.utils.get_topseller_for_category(self.c12, limit=1)
 
        # Tests the top level category
        ts = lfs.marketing.utils.get_topseller_for_category(self.c1, limit=2)
        self.assertEqual(len(ts), 2)
 
        self.assertEqual(ts[0], self.p5)
        self.assertEqual(ts[1], self.p4)
 
        # Tests the direct categories
        ts = lfs.marketing.utils.get_topseller_for_category(self.c11, limit=2)

src/l/f/lfs-HEAD/marketing/tests.py   lfs(Download)
    def test_topseller_for_category_1(self):
        """Tests topseller for specific categories.
        """
        # Tests the top level category
        ts = lfs.marketing.utils.get_topseller_for_category(self.c1, limit=2)
 
        # Tests the direct categories
        ts = lfs.marketing.utils.get_topseller_for_category(self.c11, limit=1)
        self.assertEqual(len(ts), 1)
 
        self.assertEqual(ts[0], self.p2)
 
        ts = lfs.marketing.utils.get_topseller_for_category(self.c12, limit=1)
 
        # Tests the top level category
        ts = lfs.marketing.utils.get_topseller_for_category(self.c1, limit=2)
        self.assertEqual(len(ts), 2)
 
        self.assertEqual(ts[0], self.p5)
        self.assertEqual(ts[1], self.p4)
 
        # Tests the direct categories
        ts = lfs.marketing.utils.get_topseller_for_category(self.c11, limit=2)