Example #1
0
    def test_get_custom_tax_constant(self):
        constant = DeviceConstant.get_custom_tax_constant(
            self.ecf_printer, 0, self.store)
        self.assertEquals(constant, None)

        constant = DeviceConstant.get_custom_tax_constant(
            self.ecf_printer, 18, self.store)
        self.assertNotEquals(constant, None)
        self.assertEquals(constant.constant_type, DeviceConstant.TYPE_TAX)
        self.assertEquals(constant.constant_enum, TaxType.CUSTOM)
        self.assertEquals(constant.constant_value, 18)
        self.assertEquals(constant.device_value, u'T1')
Example #2
0
    def testGetCustomTaxConstant(self):
        constant = DeviceConstant.get_custom_tax_constant(
            self.ecf_printer, 0, self.store)
        self.assertEquals(constant, None)

        constant = DeviceConstant.get_custom_tax_constant(
            self.ecf_printer, 18, self.store)
        self.assertNotEquals(constant, None)
        self.assertEquals(constant.constant_type, DeviceConstant.TYPE_TAX)
        self.assertEquals(constant.constant_enum, TaxType.CUSTOM)
        self.assertEquals(constant.constant_value, 18)
        self.assertEquals(constant.device_value, u'T1')