@@ -48,6 +48,17 @@ def test_valid_globally_unique(self):
48
48
partij_identificator_code_register = "hr" ,
49
49
)
50
50
51
+ # different partij and different sub_identificator_van
52
+ partij_c = PartijFactory .create ()
53
+ PartijIdentificator .objects .create (
54
+ partij = partij_c ,
55
+ sub_identificator_van = partij_identificator_b ,
56
+ partij_identificator_code_objecttype = "vestiging" ,
57
+ partij_identificator_code_soort_object_id = "vestigingsnummer" ,
58
+ partij_identificator_object_id = "4567456745674567" ,
59
+ partij_identificator_code_register = "hr" ,
60
+ )
61
+
51
62
# different values same sub_identificator_van
52
63
PartijIdentificator .objects .create (
53
64
partij = partij_a ,
@@ -107,20 +118,20 @@ def test_scoped_identificator_globally_unique(self):
107
118
PartijIdentificator .objects .create (
108
119
partij = partij ,
109
120
sub_identificator_van = sub_identificator_van ,
110
- partij_identificator_code_objecttype = "natuurlijk_persoon " ,
111
- partij_identificator_code_soort_object_id = "bsn " ,
112
- partij_identificator_object_id = "123456782 " ,
113
- partij_identificator_code_register = "brp " ,
121
+ partij_identificator_code_objecttype = "vestiging " ,
122
+ partij_identificator_code_soort_object_id = "vestigingsnummer " ,
123
+ partij_identificator_object_id = "112233440001 " ,
124
+ partij_identificator_code_register = "hr " ,
114
125
)
115
126
116
127
with self .assertRaises (ValidationError ) as error :
117
128
PartijIdentificator .objects .create (
118
129
partij = partij ,
119
130
sub_identificator_van = sub_identificator_van ,
120
- partij_identificator_code_objecttype = "natuurlijk_persoon " ,
121
- partij_identificator_code_soort_object_id = "bsn " ,
122
- partij_identificator_object_id = "123456782 " ,
123
- partij_identificator_code_register = "brp " ,
131
+ partij_identificator_code_objecttype = "vestiging " ,
132
+ partij_identificator_code_soort_object_id = "vestigingsnummer " ,
133
+ partij_identificator_object_id = "112233440001 " ,
134
+ partij_identificator_code_register = "hr " ,
124
135
)
125
136
self .assertEqual (
126
137
error .exception .message_dict ,
0 commit comments