def testGetTaxRateForCustomer_2(self):
     """With tax rate for customer
     """
     self.shop.taxes.invokeFactory("CustomerTax", id="customer", rate=10.0)
     tm = ITaxes(self.shop)
     rate = tm.getTaxRateForCustomer(self.product_1)
     self.assertEqual(rate, 10.0)
 def testGetTaxForCustomer_2(self):
     """With tax rate for customer
     """
     self.shop.taxes.invokeFactory("CustomerTax", id="customer", rate=10.0)        
     tm = ITaxes(self.shop)
     tax = tm.getTaxForCustomer(self.product_1)
     self.assertEqual("%.2f" % tax, "1.85")
Beispiel #3
0
 def testGetTaxForCustomer_2(self):
     """With tax rate for customer
     """
     self.shop.taxes.invokeFactory("CustomerTax", id="customer", rate=10.0)
     tm = ITaxes(self.shop)
     tax = tm.getTaxForCustomer(self.product_1)
     self.assertEqual("%.2f" % tax, "1.85")
Beispiel #4
0
 def testGetTaxRateForCustomer_2(self):
     """With tax rate for customer
     """
     self.shop.taxes.invokeFactory("CustomerTax", id="customer", rate=10.0)
     tm = ITaxes(self.shop)
     rate = tm.getTaxRateForCustomer(self.product_1)
     self.assertEqual(rate, 10.0)
    def testGetTaxRateForCustomer(self):
        """
        """
        t = ITaxes(self.item1)
        self.assertEqual(t.getTaxRate(), 19.00)

        t = ITaxes(self.item2)
        self.assertEqual(t.getTaxRate(), 19.00)
    def testGetTaxForCustomer(self):
        """
        """
        t = ITaxes(self.item1)
        tax = "%.2f" % t.getTaxForCustomer()
        self.assertEqual(tax, "7.03")

        t = ITaxes(self.item2)
        tax = "%.2f" % t.getTaxForCustomer()
        self.assertEqual(tax, "9.10")
    def testGetTaxRateForCustomer(self):
        """
        """
        t = ITaxes(self.item1)
        self.assertEqual(t.getTaxRate(), 19.00)

        t = ITaxes(self.item2)
        self.assertEqual(t.getTaxRate(), 19.00)
    def testGetTaxForCustomer(self):
        """
        """
        t = ITaxes(self.item1)
        tax = "%.2f" % t.getTaxForCustomer()
        self.assertEqual(tax, "7.03")

        t = ITaxes(self.item2)
        tax = "%.2f" % t.getTaxForCustomer()
        self.assertEqual(tax, "9.10")
 def testGetTaxForCustomer(self):
     """
     """
     t = ITaxes(self.shop.products.product_1)
     self.assertEqual("%.2f" % t.getTaxForCustomer(), "1.85")
 def testGetTax(self):
     """
     """
     t = ITaxes(self.shop.products.product_1)
     self.assertEqual("%.2f" % t.getTax(), "3.51")
 def testGetTaxRateForCustomer(self):
     """
     """
     t = ITaxes(self.shop.products.product_1)
     self.assertEqual(t.getTaxRateForCustomer(), 10.0)
 def testGetTaxRate(self):
     """
     """
     t = ITaxes(self.shop.products.product_1)
     self.assertEqual(t.getTaxRate(), 19.0)
 def testGetTax(self):
     """
     """
     tm = ITaxes(self.shop)
     tax = tm.getTax(self.product_1)
     self.assertEqual("%.2f" % tax, "3.51")
Beispiel #14
0
 def testGetTaxRateForCustomer_1(self):
     """Without tax rate for customer
     """
     tm = ITaxes(self.shop)
     rate = tm.getTaxRateForCustomer(self.product_1)
     self.assertEqual(rate, 19.0)
 def testGetTax(self):
     """
     """
     t = ITaxes(self.shop.products.product_1)
     self.assertEqual("%.2f" % t.getTax(), "3.51")
 def testGetTaxForCustomer(self):
     """
     """
     t = ITaxes(self.shop.products.product_1)
     self.assertEqual("%.2f" % t.getTaxForCustomer(), "1.85")
 def testGetTaxRateForCustomer_1(self):
     """Without tax rate for customer
     """
     tm = ITaxes(self.shop)
     rate = tm.getTaxRateForCustomer(self.product_1)
     self.assertEqual(rate, 19.0)
 def testGetTaxRate(self):
     """
     """
     tm = ITaxes(self.shop)
     rate = tm.getTaxRate(self.product_1)
     self.assertEqual(rate, 19.0)
Beispiel #19
0
 def testGetTax(self):
     """
     """
     tm = ITaxes(self.shop)
     tax = tm.getTax(self.product_1)
     self.assertEqual("%.2f" % tax, "3.51")
 def testGetTaxRateForCustomer(self):
     """
     """
     t = ITaxes(self.shop.products.product_1)
     self.assertEqual(t.getTaxRateForCustomer(), 10.0)
Beispiel #21
0
 def testGetTaxForCustomer_1(self):
     """Without tax rate for customer
     """
     tm = ITaxes(self.shop)
     tax = tm.getTaxForCustomer(self.product_1)
     self.assertEqual("%.2f" % tax, "3.51")
 def testGetTaxForCustomer_1(self):
     """Without tax rate for customer
     """
     tm = ITaxes(self.shop)
     tax = tm.getTaxForCustomer(self.product_1)
     self.assertEqual("%.2f" % tax, "3.51")
Beispiel #23
0
 def testGetTaxRate(self):
     """
     """
     tm = ITaxes(self.shop)
     rate = tm.getTaxRate(self.product_1)
     self.assertEqual(rate, 19.0)
Beispiel #24
0
 def testGetTaxRateForCustomer(self):
     """
     """
     t = ITaxes(self.cart)
     self.assertRaises(ValueError, t.getTaxRateForCustomer)
Beispiel #25
0
 def testGetTaxForCustomer(self):
     """
     """
     t = ITaxes(self.cart)
     tax = "%.2f" % t.getTaxForCustomer()
     self.assertEqual(tax, "16.13")
 def testGetTaxRate(self):
     """
     """
     t = ITaxes(self.shop.products.product_1)
     self.assertEqual(t.getTaxRate(), 19.0)