python-stdnum branch master updated. 1.14-12-g0427b01
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
python-stdnum branch master updated. 1.14-12-g0427b01
- From: Commits of the python-stdnum project <python-stdnum-commits [at] lists.arthurdejong.org>
- To: python-stdnum-commits [at] lists.arthurdejong.org
- Reply-to: python-stdnum-users [at] lists.arthurdejong.org, python-stdnum-commits [at] lists.arthurdejong.org
- Subject: python-stdnum branch master updated. 1.14-12-g0427b01
- Date: Sun, 10 Jan 2021 15:30:54 +0100 (CET)
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "python-stdnum".
The branch, master has been updated
via 0427b01985058cc01389b40df9f9bad61e547f9c (commit)
from 2f2c7427ed8126709f777a108c2cf67e50d4fc7f (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://arthurdejong.org/git/python-stdnum/commit/?id=0427b01985058cc01389b40df9f9bad61e547f9c
commit 0427b01985058cc01389b40df9f9bad61e547f9c
Author: Viggo de Vries <viggo@uwkm.nl>
Date: Mon Jan 4 12:47:12 2021 +0100
Remove GB from EU member states
Closes https://github.com/arthurdejong/python-stdnum/pull/246
diff --git a/stdnum/eu/vat.py b/stdnum/eu/vat.py
index 27d47c6..a57948b 100644
--- a/stdnum/eu/vat.py
+++ b/stdnum/eu/vat.py
@@ -44,9 +44,9 @@ from stdnum.util import clean, get_cc_module, get_soap_client
MEMBER_STATES = set([
- 'at', 'be', 'bg', 'cy', 'cz', 'de', 'dk', 'ee', 'es', 'fi', 'fr', 'gb',
- 'gr', 'hr', 'hu', 'ie', 'it', 'lt', 'lu', 'lv', 'mt', 'nl', 'pl', 'pt',
- 'ro', 'se', 'si', 'sk',
+ 'at', 'be', 'bg', 'cy', 'cz', 'de', 'dk', 'ee', 'es', 'fi', 'fr', 'gr',
+ 'hr', 'hu', 'ie', 'it', 'lt', 'lu', 'lv', 'mt', 'nl', 'pl', 'pt', 'ro',
+ 'se', 'si', 'sk',
])
"""The collection of country codes that are queried. Greece is listed with
a country code of gr while for VAT purposes el is used instead."""
diff --git a/tests/test_eu_vat.doctest b/tests/test_eu_vat.doctest
index 362f1de..7e9f258 100644
--- a/tests/test_eu_vat.doctest
+++ b/tests/test_eu_vat.doctest
@@ -347,46 +347,6 @@ These have been found online and should all be valid
numbers.
... FR88000053537
... FR96000110899
...
-... GB 002 4257 28
-... GB 003232345
-... GB 100 1950 75
-... GB 100190874
-... GB 102675046
-... GB 232177091
-... GB 242338087388
-... GB 311 405 025
-... GB 362 5866 29
-... GB 417 2280 71
-... GB 436 0630 72
-... GB 495 2781 05
-... GB 507 5768 25
-... GB 521 6763 52
-... GB 586 367 295
-... GB 591 9373 01
-... GB 605 8678 15
-... GB 662 8564 06
-... GB 698 550 577
-... GB 733 4428 41
-... GB 770 381 235
-... GB 784 9117 89
-... GB 808 6365 12
-... GB 812 8333 44
-... GB 818243334
-... GB 823 531 352
-... GB 829 9594 59
-... GB 845788960
-... GB 879 7056 62
-... GB 881 3758 91
-... GB 913 3041 68
-... GB 933210951
-... GB 975 8664 50
-... GB 977 4872 51
-... GB 980780684
-... GB 997 7094 44
-... GB260311213
-... GB653599494
-... GB974053902
-...
... HU -12509403
... HU 10672101
... HU 10766172
diff --git a/tests/test_gb_vat.doctest b/tests/test_gb_vat.doctest
index 151feb4..1196511 100644
--- a/tests/test_gb_vat.doctest
+++ b/tests/test_gb_vat.doctest
@@ -25,6 +25,52 @@ really useful as module documentation.
>>> from stdnum.gb import vat
+>>> numbers = '''
+...
+... GB 002 4257 28
+... GB 003232345
+... GB 100 1950 75
+... GB 100190874
+... GB 102675046
+... GB 232177091
+... GB 242338087388
+... GB 311 405 025
+... GB 362 5866 29
+... GB 417 2280 71
+... GB 436 0630 72
+... GB 495 2781 05
+... GB 507 5768 25
+... GB 521 6763 52
+... GB 586 367 295
+... GB 591 9373 01
+... GB 605 8678 15
+... GB 662 8564 06
+... GB 698 550 577
+... GB 733 4428 41
+... GB 770 381 235
+... GB 784 9117 89
+... GB 808 6365 12
+... GB 812 8333 44
+... GB 818243334
+... GB 823 531 352
+... GB 829 9594 59
+... GB 845788960
+... GB 879 7056 62
+... GB 881 3758 91
+... GB 913 3041 68
+... GB 933210951
+... GB 975 8664 50
+... GB 977 4872 51
+... GB 980780684
+... GB 997 7094 44
+... GB260311213
+... GB653599494
+... GB974053902
+...
+... '''
+>>> [x for x in numbers.splitlines() if x and not vat.validate(x)]
+[]
+
Normal values that should just work.
>>> vat.validate('980780684') # standard number
-----------------------------------------------------------------------
Summary of changes:
stdnum/eu/vat.py | 6 +++---
tests/test_eu_vat.doctest | 40 ----------------------------------------
tests/test_gb_vat.doctest | 46 ++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 49 insertions(+), 43 deletions(-)
hooks/post-receive
--
python-stdnum
- python-stdnum branch master updated. 1.14-12-g0427b01,
Commits of the python-stdnum project