Skip to content

Commit

Permalink
Fix Cyprus two letter country code
Browse files Browse the repository at this point in the history
  • Loading branch information
robingustafsson authored and ralphje committed Oct 20, 2016
1 parent dbc1dcf commit 3c85025
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion internationalflavor/vat_number/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
others: https://en.wikipedia.org/wiki/VAT_identification_number
"""

EU_VAT_AREA = ['AT', 'BE', 'BG', 'CV', 'CZ', 'DE', 'DK', 'EE', 'EL', 'ES', 'FI', 'FR', 'GB', 'HR',
EU_VAT_AREA = ['AT', 'BE', 'BG', 'CY', 'CZ', 'DE', 'DK', 'EE', 'EL', 'ES', 'FI', 'FR', 'GB', 'HR',
'HU', 'IE', 'IT', 'LT', 'LU', 'LV', 'MT', 'NL', 'PL', 'RO', 'SE', 'SI', 'SK']


Expand Down
4 changes: 4 additions & 0 deletions tests/test_vat_number.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ def test_validator(self):
for iban, message in self.invalid.items():
self.assertRaisesMessage(ValidationError, message[0], validator, iban)

def test_validator_eu_only(self):
validator = VATNumberValidator(eu_only=True)
validator('CY12345678A')

def test_form_field(self):
self.assertFieldOutput(VATNumberFormField, valid=self.valid, invalid=self.invalid)

Expand Down

0 comments on commit 3c85025

Please sign in to comment.