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")
示例#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")
示例#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")
示例#7
0
    def testGetTaxRateForCustomer(self):
        """
        """
        t = ITaxes(self.item1)
        self.assertEqual(t.getTaxRate(), 19.00)

        t = ITaxes(self.item2)
        self.assertEqual(t.getTaxRate(), 19.00)
示例#8
0
    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)
示例#13
0
 def testGetTax(self):
     """
     """
     tm = ITaxes(self.shop)
     tax = tm.getTax(self.product_1)
     self.assertEqual("%.2f" % tax, "3.51")
示例#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)
示例#15
0
 def testGetTax(self):
     """
     """
     t = ITaxes(self.shop.products.product_1)
     self.assertEqual("%.2f" % t.getTax(), "3.51")
示例#16
0
 def testGetTaxForCustomer(self):
     """
     """
     t = ITaxes(self.shop.products.product_1)
     self.assertEqual("%.2f" % t.getTaxForCustomer(), "1.85")
示例#17
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)
示例#18
0
 def testGetTaxRate(self):
     """
     """
     tm = ITaxes(self.shop)
     rate = tm.getTaxRate(self.product_1)
     self.assertEqual(rate, 19.0)
示例#19
0
 def testGetTax(self):
     """
     """
     tm = ITaxes(self.shop)
     tax = tm.getTax(self.product_1)
     self.assertEqual("%.2f" % tax, "3.51")
示例#20
0
 def testGetTaxRateForCustomer(self):
     """
     """
     t = ITaxes(self.shop.products.product_1)
     self.assertEqual(t.getTaxRateForCustomer(), 10.0)
示例#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")
示例#22
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")
示例#23
0
 def testGetTaxRate(self):
     """
     """
     tm = ITaxes(self.shop)
     rate = tm.getTaxRate(self.product_1)
     self.assertEqual(rate, 19.0)
示例#24
0
 def testGetTaxRateForCustomer(self):
     """
     """
     t = ITaxes(self.cart)
     self.assertRaises(ValueError, t.getTaxRateForCustomer)
示例#25
0
 def testGetTaxForCustomer(self):
     """
     """
     t = ITaxes(self.cart)
     tax = "%.2f" % t.getTaxForCustomer()
     self.assertEqual(tax, "16.13")
示例#26
0
 def testGetTaxRate(self):
     """
     """
     t = ITaxes(self.shop.products.product_1)
     self.assertEqual(t.getTaxRate(), 19.0)