python-stdnum branch master updated. 1.18-33-g3126f96
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
python-stdnum branch master updated. 1.18-33-g3126f96
- 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.18-33-g3126f96
- Date: Sun, 20 Aug 2023 13:34:53 +0200 (CEST)
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 3126f96b5309ae5fb2e26489a8caea2e6a4d6ae9 (commit)
via 88d1dca7707cd6c237a3b5ef5ddde19fd388069a (commit)
from 6e56f3c955240a4cfc411a8ed3636f843c2b80dc (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=3126f96b5309ae5fb2e26489a8caea2e6a4d6ae9
commit 3126f96b5309ae5fb2e26489a8caea2e6a4d6ae9
Author: Arthur de Jong <arthur@arthurdejong.org>
Date: Sun Aug 20 13:32:45 2023 +0200
Update Belarusian UNP online check
The API for the online check for Belarusian UNP numbers at
https://www.portal.nalog.gov.by/grp/getData has changed some small
details of the API.
diff --git a/stdnum/by/unp.py b/stdnum/by/unp.py
index 5b9c324..1ea519c 100644
--- a/stdnum/by/unp.py
+++ b/stdnum/by/unp.py
@@ -125,5 +125,5 @@ def check_nalog(number, timeout=30): # pragma: no cover
(not part of normal tes
'type': 'json'},
timeout=timeout,
verify=certificate)
- if response.ok:
- return response.json()['ROW']
+ if response.ok and response.content:
+ return response.json()['row']
diff --git a/tests/test_by_unp.py b/tests/test_by_unp.py
index 229b034..6a375ce 100644
--- a/tests/test_by_unp.py
+++ b/tests/test_by_unp.py
@@ -42,22 +42,22 @@ class TestNalog(unittest.TestCase):
self.assertDictEqual(
result,
{
- 'CKODSOST': '1',
- 'DLIKV': None,
- 'DREG': '08.07.2011',
- 'NMNS': '104',
- 'VKODS': 'Действующий',
- 'VLIKV': None,
- 'VMNS': 'Инспекция МНС по Московскому району г.Минска ',
- 'VNAIMK': 'Частное предприятие "КРИОС ГРУПП"',
- 'VNAIMP': 'Частное производственное унитарное предприятие
"КРИОС ГРУПП"',
- 'VPADRES': 'г. Минск,ул. Уманская, д.54, пом. 152',
- 'VUNP': '191682495',
+ 'ckodsost': '1',
+ 'dlikv': None,
+ 'dreg': '2011-07-08',
+ 'nmns': '104',
+ 'vkods': 'Действующий',
+ 'vlikv': None,
+ 'vmns': 'Инспекция МНС по Московскому району г.Минска ',
+ 'vnaimk': 'Частное предприятие "КРИОС ГРУПП"',
+ 'vnaimp': 'Частное производственное унитарное предприятие
"КРИОС ГРУПП"',
+ 'vpadres': 'г. Минск,ул. Уманская, д.54, пом. 152',
+ 'vunp': '191682495',
})
# Check that result has at least these keys
- keys = ['VUNP', 'VNAIMP', 'VNAIMK', 'DREG', 'CKODSOST', 'VKODS']
+ keys = ['vunp', 'vnaimp', 'vnaimk', 'dreg', 'ckodsost', 'vkods']
self.assertEqual([key for key in keys if key in result], keys)
- self.assertEqual(result['VUNP'], '191682495')
+ self.assertEqual(result['vunp'], '191682495')
# Test invalid number
result = unp.check_nalog('771681495')
self.assertIsNone(result)
https://arthurdejong.org/git/python-stdnum/commit/?id=88d1dca7707cd6c237a3b5ef5ddde19fd388069a
commit 88d1dca7707cd6c237a3b5ef5ddde19fd388069a
Author: Arthur de Jong <arthur@arthurdejong.org>
Date: Sun Aug 20 13:31:16 2023 +0200
Replace test number for German company registry
The number seems to be no longer valid breaking the online tests.
diff --git a/tests/test_de_handelsregisternummer.py
b/tests/test_de_handelsregisternummer.py
index aa1473a..1b0d293 100644
--- a/tests/test_de_handelsregisternummer.py
+++ b/tests/test_de_handelsregisternummer.py
@@ -38,7 +38,7 @@ class TestOffeneRegister(unittest.TestCase):
def test_check_offeneregister(self):
"""Test stdnum.de.handelsregisternummer.check_offeneregister()"""
# Test a normal valid number
- result = handelsregisternummer.check_offeneregister('Chemnitz HRB
14011')
+ result = handelsregisternummer.check_offeneregister('Chemnitz HRB
32854')
self.assertTrue(all(
key in result.keys()
for key in ['companyId', 'courtCode', 'courtName', 'name',
'nativeReferenceNumber']))
-----------------------------------------------------------------------
Summary of changes:
stdnum/by/unp.py | 4 ++--
tests/test_by_unp.py | 26 +++++++++++++-------------
tests/test_de_handelsregisternummer.py | 2 +-
3 files changed, 16 insertions(+), 16 deletions(-)
hooks/post-receive
--
python-stdnum
- python-stdnum branch master updated. 1.18-33-g3126f96,
Commits of the python-stdnum project