예제 #1
0
 def test_get_items_count(self):
     self.assertEqual(get_items_count(ItemPrototype._db_all()),
                      (collections.Counter({
                          self.kit_2.id: 1,
                          self.kit_3.id: 1
                      }), {
                          self.collection_2.id: 2
                      }))
예제 #2
0
    def test_get_items_count__with_account(self):
        self.account_1_items.add_item(self.item_3_1)
        self.account_1_items.save()

        self.assertEqual(
            get_items_count(
                ItemPrototype._db_filter(
                    id__in=self.account_1_items.items_ids())),
            (collections.Counter({self.kit_3.id: 1}), {
                self.collection_2.id: 1
            }))
예제 #3
0
    def test_get_items_count__with_account(self):
        self.account_1_items.add_item(self.item_3_1)
        self.account_1_items.save()

        self.assertEqual(get_items_count(ItemPrototype._db_filter(id__in=self.account_1_items.items_ids())),
                         (collections.Counter({self.kit_3.id: 1}), {self.collection_2.id: 1}))
예제 #4
0
 def test_get_items_count(self):
     self.assertEqual(get_items_count(ItemPrototype._db_all()),
                      (collections.Counter({self.kit_2.id: 1, self.kit_3.id: 1}), {self.collection_2.id: 2}))