@@ -21,8 +21,8 @@ def test_persoon_detail(self):
21
21
adres_adresregel1 = "adresregel1" ,
22
22
adres_adresregel2 = "adresregel2" ,
23
23
adres_adresregel3 = "adresregel3" ,
24
- adres_land = "5001 " ,
25
- land = "5001 " ,
24
+ adres_land = "CA " ,
25
+ land = "CA " ,
26
26
)
27
27
detail_url = reverse (
28
28
"contactgegevens:persoon-detail" ,
@@ -34,7 +34,7 @@ def test_persoon_detail(self):
34
34
"adresregel1" : "adresregel1" ,
35
35
"adresregel2" : "adresregel2" ,
36
36
"adresregel3" : "adresregel3" ,
37
- "land" : "5001 " ,
37
+ "land" : "CA " ,
38
38
}
39
39
expected_data = {
40
40
"uuid" : str (persoon .uuid ),
@@ -46,7 +46,7 @@ def test_persoon_detail(self):
46
46
"voorvoegsel" : "" ,
47
47
"voornamen" : "John" ,
48
48
"adres" : expected_adres ,
49
- "land" : "5001 " ,
49
+ "land" : "CA " ,
50
50
}
51
51
52
52
response = self .client .get (detail_url )
@@ -68,9 +68,9 @@ def test_create_persoon(self):
68
68
"adresregel1" : "adresregel1" ,
69
69
"adresregel2" : "adresregel2" ,
70
70
"adresregel3" : "adresregel3" ,
71
- "land" : "5001 " ,
71
+ "land" : "CA " ,
72
72
},
73
- "land" : "5001 " ,
73
+ "land" : "CA " ,
74
74
}
75
75
76
76
response = self .client .post (list_url , data )
@@ -92,10 +92,10 @@ def test_create_persoon(self):
92
92
"adresregel1" : "adresregel1" ,
93
93
"adresregel2" : "adresregel2" ,
94
94
"adresregel3" : "adresregel3" ,
95
- "land" : "5001 " ,
95
+ "land" : "CA " ,
96
96
},
97
97
)
98
- self .assertEqual (data ["land" ], "5001 " )
98
+ self .assertEqual (data ["land" ], "CA " )
99
99
100
100
def test_update_persoon (self ):
101
101
persoon = PersoonFactory .create (
@@ -109,8 +109,8 @@ def test_update_persoon(self):
109
109
adres_adresregel1 = "adresregel1" ,
110
110
adres_adresregel2 = "adresregel2" ,
111
111
adres_adresregel3 = "adresregel3" ,
112
- adres_land = "5001 " ,
113
- land = "5001 " ,
112
+ adres_land = "CA " ,
113
+ land = "CA " ,
114
114
)
115
115
detail_url = reverse (
116
116
"contactgegevens:persoon-detail" ,
@@ -136,10 +136,10 @@ def test_update_persoon(self):
136
136
"adresregel1" : "adresregel1" ,
137
137
"adresregel2" : "adresregel2" ,
138
138
"adresregel3" : "adresregel3" ,
139
- "land" : "5001 " ,
139
+ "land" : "CA " ,
140
140
},
141
141
)
142
- self .assertEqual (data ["land" ], "5001 " )
142
+ self .assertEqual (data ["land" ], "CA " )
143
143
144
144
data = {
145
145
"geboortedatum" : "1972-05-06" ,
@@ -153,12 +153,13 @@ def test_update_persoon(self):
153
153
"adresregel1" : "changed" ,
154
154
"adresregel2" : "changed" ,
155
155
"adresregel3" : "changed" ,
156
- "land" : "6713 " ,
156
+ "land" : "FR " ,
157
157
},
158
- "land" : "6713 " ,
158
+ "land" : "FR " ,
159
159
}
160
160
response = self .client .put (detail_url , data )
161
161
data = response .json ()
162
+
162
163
self .assertEqual (data ["geboortedatum" ], "1972-05-06" )
163
164
self .assertEqual (data ["overlijdensdatum" ], "2023-11-22" )
164
165
self .assertEqual (data ["geslachtsnaam" ], "changed" )
@@ -172,10 +173,10 @@ def test_update_persoon(self):
172
173
"adresregel1" : "changed" ,
173
174
"adresregel2" : "changed" ,
174
175
"adresregel3" : "changed" ,
175
- "land" : "6713 " ,
176
+ "land" : "FR " ,
176
177
},
177
178
)
178
- self .assertEqual (data ["land" ], "6713 " )
179
+ self .assertEqual (data ["land" ], "FR " )
179
180
180
181
def test_update_partial_persoon (self ):
181
182
persoon = PersoonFactory .create (
@@ -189,8 +190,8 @@ def test_update_partial_persoon(self):
189
190
adres_adresregel1 = "adresregel1" ,
190
191
adres_adresregel2 = "adresregel2" ,
191
192
adres_adresregel3 = "adresregel3" ,
192
- adres_land = "5001 " ,
193
- land = "5001 " ,
193
+ adres_land = "CA " ,
194
+ land = "CA " ,
194
195
)
195
196
detail_url = reverse (
196
197
"contactgegevens:persoon-detail" ,
@@ -216,10 +217,10 @@ def test_update_partial_persoon(self):
216
217
"adresregel1" : "adresregel1" ,
217
218
"adresregel2" : "adresregel2" ,
218
219
"adresregel3" : "adresregel3" ,
219
- "land" : "5001 " ,
220
+ "land" : "CA " ,
220
221
},
221
222
)
222
- self .assertEqual (data ["land" ], "5001 " )
223
+ self .assertEqual (data ["land" ], "CA " )
223
224
224
225
data = {
225
226
"overlijdensdatum" : "2023-11-22" ,
@@ -240,10 +241,10 @@ def test_update_partial_persoon(self):
240
241
"adresregel1" : "adresregel1" ,
241
242
"adresregel2" : "adresregel2" ,
242
243
"adresregel3" : "adresregel3" ,
243
- "land" : "5001 " ,
244
+ "land" : "CA " ,
244
245
},
245
246
)
246
- self .assertEqual (data ["land" ], "5001 " )
247
+ self .assertEqual (data ["land" ], "CA " )
247
248
248
249
def test_list_pagination_pagesize_param (self ):
249
250
list_url = reverse ("contactgegevens:persoon-list" )
@@ -269,8 +270,8 @@ def test_organisatie_detail(self):
269
270
adres_adresregel1 = "adresregel1" ,
270
271
adres_adresregel2 = "adresregel2" ,
271
272
adres_adresregel3 = "adresregel3" ,
272
- adres_land = "5001 " ,
273
- land = "5001 " ,
273
+ adres_land = "CA " ,
274
+ land = "CA " ,
274
275
)
275
276
detail_url = reverse (
276
277
"contactgegevens:organisatie-detail" ,
@@ -282,7 +283,7 @@ def test_organisatie_detail(self):
282
283
"adresregel1" : "adresregel1" ,
283
284
"adresregel2" : "adresregel2" ,
284
285
"adresregel3" : "adresregel3" ,
285
- "land" : "5001 " ,
286
+ "land" : "CA " ,
286
287
}
287
288
expected_data = {
288
289
"uuid" : str (organisatie .uuid ),
@@ -291,7 +292,7 @@ def test_organisatie_detail(self):
291
292
"opheffingsdatum" : "2020-09-05" ,
292
293
"handelsnaam" : "Devin Townsend" ,
293
294
"adres" : expected_adres ,
294
- "land" : "5001 " ,
295
+ "land" : "CA " ,
295
296
}
296
297
297
298
response = self .client .get (detail_url )
@@ -311,9 +312,9 @@ def test_create_organisatie(self):
311
312
"adresregel1" : "adresregel1" ,
312
313
"adresregel2" : "adresregel2" ,
313
314
"adresregel3" : "adresregel3" ,
314
- "land" : "5001 " ,
315
+ "land" : "CA " ,
315
316
},
316
- "land" : "5001 " ,
317
+ "land" : "CA " ,
317
318
}
318
319
319
320
response = self .client .post (list_url , data )
@@ -332,10 +333,10 @@ def test_create_organisatie(self):
332
333
"adresregel1" : "adresregel1" ,
333
334
"adresregel2" : "adresregel2" ,
334
335
"adresregel3" : "adresregel3" ,
335
- "land" : "5001 " ,
336
+ "land" : "CA " ,
336
337
},
337
338
)
338
- self .assertEqual (data ["land" ], "5001 " )
339
+ self .assertEqual (data ["land" ], "CA " )
339
340
340
341
def test_update_organisatie (self ):
341
342
organisatie = OrganisatieFactory .create (
@@ -346,8 +347,8 @@ def test_update_organisatie(self):
346
347
adres_adresregel1 = "adresregel1" ,
347
348
adres_adresregel2 = "adresregel2" ,
348
349
adres_adresregel3 = "adresregel3" ,
349
- adres_land = "5001 " ,
350
- land = "5001 " ,
350
+ adres_land = "CA " ,
351
+ land = "CA " ,
351
352
)
352
353
detail_url = reverse (
353
354
"contactgegevens:organisatie-detail" ,
@@ -370,10 +371,10 @@ def test_update_organisatie(self):
370
371
"adresregel1" : "adresregel1" ,
371
372
"adresregel2" : "adresregel2" ,
372
373
"adresregel3" : "adresregel3" ,
373
- "land" : "5001 " ,
374
+ "land" : "CA " ,
374
375
},
375
376
)
376
- self .assertEqual (data ["land" ], "5001 " )
377
+ self .assertEqual (data ["land" ], "CA " )
377
378
378
379
data = {
379
380
"handelsnaam" : "changed" ,
@@ -384,9 +385,9 @@ def test_update_organisatie(self):
384
385
"adresregel1" : "changed" ,
385
386
"adresregel2" : "changed" ,
386
387
"adresregel3" : "changed" ,
387
- "land" : "6713 " ,
388
+ "land" : "FR " ,
388
389
},
389
- "land" : "6713 " ,
390
+ "land" : "FR " ,
390
391
}
391
392
response = self .client .put (detail_url , data )
392
393
data = response .json ()
@@ -400,10 +401,10 @@ def test_update_organisatie(self):
400
401
"adresregel1" : "changed" ,
401
402
"adresregel2" : "changed" ,
402
403
"adresregel3" : "changed" ,
403
- "land" : "6713 " ,
404
+ "land" : "FR " ,
404
405
},
405
406
)
406
- self .assertEqual (data ["land" ], "6713 " )
407
+ self .assertEqual (data ["land" ], "FR " )
407
408
408
409
def test_update_partial_organisatie (self ):
409
410
organisatie = OrganisatieFactory .create (
@@ -414,8 +415,8 @@ def test_update_partial_organisatie(self):
414
415
adres_adresregel1 = "adresregel1" ,
415
416
adres_adresregel2 = "adresregel2" ,
416
417
adres_adresregel3 = "adresregel3" ,
417
- adres_land = "5001 " ,
418
- land = "5001 " ,
418
+ adres_land = "CA " ,
419
+ land = "CA " ,
419
420
)
420
421
detail_url = reverse (
421
422
"contactgegevens:organisatie-detail" ,
@@ -438,10 +439,10 @@ def test_update_partial_organisatie(self):
438
439
"adresregel1" : "adresregel1" ,
439
440
"adresregel2" : "adresregel2" ,
440
441
"adresregel3" : "adresregel3" ,
441
- "land" : "5001 " ,
442
+ "land" : "CA " ,
442
443
},
443
444
)
444
- self .assertEqual (data ["land" ], "5001 " )
445
+ self .assertEqual (data ["land" ], "CA " )
445
446
446
447
data = {
447
448
"opheffingsdatum" : "2023-11-22" ,
@@ -460,10 +461,10 @@ def test_update_partial_organisatie(self):
460
461
"adresregel1" : "adresregel1" ,
461
462
"adresregel2" : "adresregel2" ,
462
463
"adresregel3" : "adresregel3" ,
463
- "land" : "5001 " ,
464
+ "land" : "CA " ,
464
465
},
465
466
)
466
- self .assertEqual (data ["land" ], "5001 " )
467
+ self .assertEqual (data ["land" ], "CA " )
467
468
468
469
def test_list_pagination_pagesize_param (self ):
469
470
list_url = reverse ("contactgegevens:organisatie-list" )
0 commit comments