コード例 #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)
コード例 #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
コード例 #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)
コード例 #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