예제 #1
0
 def test_category_counter_single_product(self):
     testCategory = Category.objects.get(pk=2)
     admin = CategoryAdmin(Category, testCategory)
     self.assertEquals(1, admin.items_in_category(testCategory))
예제 #2
0
 def test_category_counter_empty(self):
     testCategory = Category.objects.get(pk=1)
     admin = CategoryAdmin(Category, testCategory)
     self.assertEquals(0, admin.items_in_category(testCategory))