Fix crash on VAT IDs with missing country prefix

This commit is contained in:
Raphael Michel
2022-08-14 21:44:50 +02:00
parent b5e5796549
commit 65b4741e27
2 changed files with 10 additions and 0 deletions

View File

@@ -16,6 +16,12 @@ def test_eu_invalid_format():
validate_vat_id('AT12345', 'AT')
@responses.activate
def test_eu_no_prefix():
with pytest.raises(VATIDFinalError):
validate_vat_id('12345', 'AT')
@responses.activate
def test_eu_country_mismatch():
with pytest.raises(VATIDFinalError):