File tree Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Original file line number Diff line number Diff line change
1
+ """Test i18n/inn."""
2
+
3
+ # external
4
+ import pytest
5
+
6
+ # local
7
+ from src .validators import ValidationError
8
+ from src .validators .i18n import ru_inn
9
+
10
+
11
+ @pytest .mark .parametrize (
12
+ ("value" ,),
13
+ [
14
+ ("2222058686" ,),
15
+ ("7709439560" ,),
16
+ ("5003052454" ,),
17
+ ("7730257499" ,),
18
+ ("3664016814" ,),
19
+ ("026504247480" ,),
20
+ ("780103209220" ,),
21
+ ("7707012148" ,),
22
+ ("140700989885" ,),
23
+ ("774334078053" ,),
24
+ ],
25
+ )
26
+ def test_returns_true_on_valid_ru_inn (value : str ):
27
+ """Test returns true on valid russian individual tax number"""
28
+ assert ru_inn (value )
29
+
30
+
31
+ @pytest .mark .parametrize (
32
+ ("value" ,),
33
+ [
34
+ ("2222058687" ,),
35
+ ("7709439561" ,),
36
+ ("5003052453" ,),
37
+ ("7730257490" ,),
38
+ ("3664016815" ,),
39
+ ("026504247481" ,),
40
+ ("780103209222" ,),
41
+ ("7707012149" ,),
42
+ ("140700989886" ,),
43
+ ("774334078054" ,),
44
+ ],
45
+ )
46
+ def test_returns_false_on_valid_ru_inn (value : str ):
47
+ """Test returns true on valid russian individual tax number"""
48
+ assert isinstance (ru_inn (value ), ValidationError )
You can’t perform that action at this time.
0 commit comments