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)
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