Exemple #1
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
            }))
Exemple #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}))