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 }))
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 }))
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}))
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}))