Skip to content

Commit

Permalink
vatin: Add a few more tests for is_valid
Browse files Browse the repository at this point in the history
  • Loading branch information
unho authored and arthurdejong committed Nov 13, 2022
1 parent fa62ea3 commit 7348c7a
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/test_vatin.doctest
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,21 @@ InvalidComponent: ...
Traceback (most recent call last):
...
InvalidComponent: ...


Check is_valid for several scenarios:

>>> vatin.is_valid('FR 40 303 265 045')
True
>>> vatin.is_valid('FR 40 303')
False
>>> vatin.is_valid('FR')
False
>>> vatin.is_valid('')
False
>>> vatin.is_valid('00')
False
>>> vatin.is_valid('XX')
False
>>> vatin.is_valid('US')
False

0 comments on commit 7348c7a

Please sign in to comment.