def test_create(self):
        taxservice = TaxService()
        taxservice.TaxCode = self.name
        tax_rate_detail = TaxRateDetails()

        tax_rate_detail.TaxRateName = self.name
        tax_rate_detail.RateValue = 10
        tax_rate_detail.TaxAgencyId = 1
        tax_rate_detail.TaxApplicableOn = "Sales"

        taxservice.TaxRateDetails.append(tax_rate_detail)

        created_taxservice = taxservice.save(qb=self.qb_client)

        self.assertEqual(created_taxservice.TaxCode, self.name)

        detail = created_taxservice.TaxRateDetails[0]
        self.assertEqual(detail.TaxRateName, self.name)
        self.assertEqual(detail.RateValue, 10)
        self.assertEqual(detail.TaxAgencyId, '1')
        self.assertEqual(detail.TaxApplicableOn, "Sales")
Esempio n. 2
0
    def test_create(self):
        taxservice = TaxService()
        taxservice.TaxCode = self.name
        tax_rate_detail = TaxRateDetails()

        tax_rate_detail.TaxRateName = self.name
        tax_rate_detail.RateValue = 10
        tax_rate_detail.TaxAgencyId = 1
        tax_rate_detail.TaxApplicableOn = "Sales"

        taxservice.TaxRateDetails.append(tax_rate_detail)

        created_taxservice = taxservice.save(qb=self.qb_client)

        self.assertEquals(created_taxservice.TaxCode, self.name)

        detail = created_taxservice.TaxRateDetails[0]
        self.assertEquals(detail.TaxRateName, self.name)
        self.assertEquals(detail.RateValue, 10)
        self.assertEquals(detail.TaxAgencyId, '1')
        self.assertEquals(detail.TaxApplicableOn, "Sales")
    def test_unicode(self):
        tax = TaxService()
        tax.TaxCode = "test"

        self.assertEqual(str(tax), "test")
    def test_unicode(self):
        tax = TaxService()
        tax.TaxCode = "test"

        self.assertEquals(unicode(tax), "test")