This repository was archived by the owner on Jan 8, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +21
-7
lines changed Expand file tree Collapse file tree 3 files changed +21
-7
lines changed Original file line number Diff line number Diff line change
1
+ from types import SimpleNamespace
1
2
from .hrv .personal_id import PersonalID
2
3
from .util import alias_of
3
4
4
-
5
5
NationalID = alias_of (PersonalID )
6
6
"""
7
7
alias of PersonalID
10
10
"""
11
11
alias of PersonalID
12
12
"""
13
+ PIN = alias_of (PersonalID )
14
+ """
15
+ alias of PersonalID
16
+ """
17
+ TIN = SimpleNamespace (** {
18
+ 'individual' : PersonalID ,
19
+ 'entity' : PersonalID
20
+ })
21
+ """
22
+ According to the doc in https://www.porezna-uprava.hr/en/Pages/PIN.aspx, we know the TIN for individual and entity are
23
+ the same.
24
+ """
Original file line number Diff line number Diff line change @@ -19,8 +19,10 @@ class PersonalID:
19
19
'alias_of' : None ,
20
20
'names' : ['Personal ID Number' ,
21
21
'Osobni identifikacijski broj' ,
22
- 'OIB' ],
23
- 'links' : ['https://en.wikipedia.org/wiki/Personal_identification_number_(Croatia)' ],
22
+ 'OIB' ,
23
+ 'PIN' ],
24
+ 'links' : ['https://en.wikipedia.org/wiki/Personal_identification_number_(Croatia)' ,
25
+ 'https://www.porezna-uprava.hr/en/Pages/PIN.aspx' ],
24
26
'deprecated' : False
25
27
26
28
})
Original file line number Diff line number Diff line change 1
- from unittest import TestCase , main
1
+ from unittest import TestCase
2
2
from idnumbers .nationalid import HRV
3
3
4
4
@@ -11,6 +11,6 @@ def test_error_case(self):
11
11
self .assertFalse (HRV .PersonalID .validate ('6943515153' ))
12
12
self .assertFalse (HRV .PersonalID .validate ('69435151531' ))
13
13
14
-
15
- if __name__ == '__main__' :
16
- main ( )
14
+ def test_tin_cases ( self ):
15
+ self . assertTrue ( HRV . TIN . individual . validate ( '94577403194' ))
16
+ self . assertTrue ( HRV . TIN . entity . validate ( '23961056387' ) )
You can’t perform that action at this time.
0 commit comments