Exemplo n.º 1
0
    def test_invalid_combination(self):
        for addr, num in self.INVALID_COMBINATIONS:
            country_code = addr.get('country')
            postcode = addr.get('postcode')
            city = addr.get('line4')

            with self.assertRaises(vat.VATAssessmentException):
                result_rate = vat.lookup_vat(None, city, country_code,
                                             postcode, num, None)
Exemplo n.º 2
0
    def test_valid_combination(self):
        for addr, num, expected_rate in self.VALID_COMBINATIONS:
            country_code = addr.get('country')
            postcode = addr.get('postcode')
            city = addr.get('line4')

            result_rate = vat.lookup_vat(None, city, country_code, postcode,
                                         num, None)
            self.assertEqual(result_rate, expected_rate)
        pass
Exemplo n.º 3
0
    def test_invalid_combination(self):
        for addr, num in self.INVALID_COMBINATIONS:
            country_code = addr.get('country')
            postcode = addr.get('postcode')
            city = addr.get('line4')

            with self.assertRaises(vat.VATAssessmentException):
                result_rate = vat.lookup_vat(None,
                                             city,
                                             country_code,
                                             postcode,
                                             num,
                                             None)
Exemplo n.º 4
0
    def test_valid_combination(self):
        for addr, num, expected_rate in self.VALID_COMBINATIONS:
            country_code = addr.get('country')
            postcode = addr.get('postcode')
            city = addr.get('line4')

            result_rate = vat.lookup_vat(None,
                                         city,
                                         country_code,
                                         postcode,
                                         num,
                                         None)
            self.assertEqual(result_rate,
                             expected_rate)
        pass