Exemplo n.º 1
0
    def test_get_supplier_recursively(self):
        cart = ShoppingCartAdapter(self.shopitem, self.shopitem.REQUEST)
        cart.add_item()

        self.category.setSupplier(IUUID(self.supplier))
        self.assertEquals(self.supplier, cart._get_supplier(self.shopitem))
Exemplo n.º 2
0
    def test_get_supplier_from_shopitem(self):
        cart = ShoppingCartAdapter(self.shopitem, self.shopitem.REQUEST)
        cart.add_item()

        self.shopitem.setSupplier(IUUID(self.supplier))
        self.assertEquals(self.supplier, cart._get_supplier(self.shopitem))