@@ -2126,7 +2126,7 @@ def test_invalid_validation_partij_identificator_code_objecttype(self):
2126
2126
self .assertEqual (response .data ["invalid_params" ][0 ]["code" ], "invalid" )
2127
2127
self .assertEqual (
2128
2128
response .data ["invalid_params" ][0 ]["reason" ],
2129
- "voor `codeRegister` brp zijn alleen deze waarden toegestaan: ['natuurlijk_persoon']" ,
2129
+ "voor `codeRegister` brp zijn alleen deze waarden toegestaan: ['natuurlijk_persoon', 'overig' ]" ,
2130
2130
)
2131
2131
2132
2132
def test_invalid_validation_partij_identificator_code_soort_object_id (self ):
@@ -2154,7 +2154,7 @@ def test_invalid_validation_partij_identificator_code_soort_object_id(self):
2154
2154
self .assertEqual (response .data ["invalid_params" ][0 ]["code" ], "invalid" )
2155
2155
self .assertEqual (
2156
2156
response .data ["invalid_params" ][0 ]["reason" ],
2157
- "voor `codeObjecttype` natuurlijk_persoon zijn alleen deze waarden toegestaan: ['bsn']" ,
2157
+ "voor `codeObjecttype` natuurlijk_persoon zijn alleen deze waarden toegestaan: ['bsn', 'overig' ]" ,
2158
2158
)
2159
2159
2160
2160
def test_invalid_validation_partij_identificator_object_id (self ):
@@ -2217,7 +2217,7 @@ def test_valid_validation_partij_identificator(self):
2217
2217
"brp" ,
2218
2218
)
2219
2219
2220
- def test_valid_overig_validation_partij_identificator (self ):
2220
+ def test_valid_overig_code_register_validation_partij_identificator (self ):
2221
2221
# Overig no validation
2222
2222
url = reverse ("klantinteracties:partijidentificator-list" )
2223
2223
partij = PartijFactory .create ()
@@ -2249,6 +2249,39 @@ def test_valid_overig_validation_partij_identificator(self):
2249
2249
"overig" ,
2250
2250
)
2251
2251
2252
+ def test_valid_overig_code_objecttype_validation_partij_identificator (self ):
2253
+ # Overig no validation
2254
+ url = reverse ("klantinteracties:partijidentificator-list" )
2255
+ partij = PartijFactory .create ()
2256
+ data = {
2257
+ "identificeerdePartij" : {"uuid" : str (partij .uuid )},
2258
+ "anderePartijIdentificator" : "anderePartijIdentificator" ,
2259
+ "partijIdentificator" : {
2260
+ "codeObjecttype" : "overig" ,
2261
+ "codeSoortObjectId" : "bsn" ,
2262
+ "objectId" : 296648875 ,
2263
+ "codeRegister" : "brp" ,
2264
+ },
2265
+ }
2266
+ response = self .client .post (url , data )
2267
+ self .assertEqual (response .status_code , status .HTTP_201_CREATED )
2268
+ self .assertEqual (
2269
+ response .data ["partij_identificator" ]["code_objecttype" ],
2270
+ "overig" ,
2271
+ )
2272
+ self .assertEqual (
2273
+ response .data ["partij_identificator" ]["code_soort_object_id" ],
2274
+ "bsn" ,
2275
+ )
2276
+ self .assertEqual (
2277
+ response .data ["partij_identificator" ]["object_id" ],
2278
+ "296648875" ,
2279
+ )
2280
+ self .assertEqual (
2281
+ response .data ["partij_identificator" ]["code_register" ],
2282
+ "brp" ,
2283
+ )
2284
+
2252
2285
2253
2286
class CategorieRelatieTests (APITestCase ):
2254
2287
def test_list_categorie_relatie (self ):
0 commit comments