@@ -680,6 +680,14 @@ def test_update_partij(self):
680
680
rekeningnummer = RekeningnummerFactory .create (partij = partij )
681
681
rekeningnummer2 = RekeningnummerFactory .create ()
682
682
683
+ partij_identificator = PartijIdentificatorFactory .create (
684
+ partij = partij ,
685
+ partij_identificator_code_objecttype = "natuurlijk_persoon" ,
686
+ partij_identificator_code_soort_object_id = "bsn" ,
687
+ partij_identificator_object_id = "296648875" ,
688
+ partij_identificator_code_register = "brp" ,
689
+ )
690
+
683
691
detail_url = reverse (
684
692
"klantinteracties:partij-detail" , kwargs = {"uuid" : str (partij .uuid )}
685
693
)
@@ -745,6 +753,16 @@ def test_update_partij(self):
745
753
},
746
754
)
747
755
756
+ self .assertEqual (
757
+ data ["partijIdentificatoren" ][0 ]["partijIdentificator" ],
758
+ {
759
+ "codeObjecttype" : partij_identificator .partij_identificator_code_objecttype ,
760
+ "codeSoortObjectId" : partij_identificator .partij_identificator_code_soort_object_id ,
761
+ "objectId" : partij_identificator .partij_identificator_object_id ,
762
+ "codeRegister" : partij_identificator .partij_identificator_code_register ,
763
+ },
764
+ )
765
+
748
766
data = {
749
767
"nummer" : "6427834668" ,
750
768
"interneNotitie" : "changed" ,
@@ -778,6 +796,17 @@ def test_update_partij(self):
778
796
"achternaam" : "Bennette" ,
779
797
}
780
798
},
799
+ "partijIdentificatoren" : [
800
+ {
801
+ "anderePartijIdentificator" : "string" ,
802
+ "partijIdentificator" : {
803
+ "codeObjecttype" : "niet_natuurlijk_persoon" ,
804
+ "codeSoortObjectId" : "rsin" ,
805
+ "objectId" : "296648875" ,
806
+ "codeRegister" : "hr" ,
807
+ },
808
+ }
809
+ ],
781
810
}
782
811
783
812
response = self .client .put (detail_url , data )
@@ -846,6 +875,16 @@ def test_update_partij(self):
846
875
},
847
876
},
848
877
)
878
+ self .assertEqual (len (data ["partijIdentificatoren" ]), 1 )
879
+ self .assertEqual (
880
+ data ["partijIdentificatoren" ][0 ]["partijIdentificator" ],
881
+ {
882
+ "codeObjecttype" : "niet_natuurlijk_persoon" ,
883
+ "codeSoortObjectId" : "rsin" ,
884
+ "objectId" : "296648875" ,
885
+ "codeRegister" : "hr" ,
886
+ },
887
+ )
849
888
850
889
with self .subTest (
851
890
"test_voorkeurs_digitaal_adres_must_be_part_of_digitale_adressen"
0 commit comments