@@ -532,6 +532,19 @@ def setUp(self):
532
532
antwoord = "no" ,
533
533
onderwerp = "e_suite_subject_code" ,
534
534
)
535
+ self .contactmoment_balie = generate_oas_component_cached (
536
+ "cmc" ,
537
+ "schemas/Contactmoment" ,
538
+ url = f"{ CONTACTMOMENTEN_ROOT } contactmoment/aaaaaaaa-aaaa-aaaa-aaaa-cccccccccccc" ,
539
+ bronorganisatie = "123456789" ,
540
+ identificatie = "AB123" ,
541
+ registratiedatum = "2024-09-27T03:39:28+00:00" ,
542
+ type = "SomeType" ,
543
+ kanaal = "Balie" ,
544
+ status = ContactMomentStatus .afgehandeld ,
545
+ antwoord = "no" ,
546
+ onderwerp = "e_suite_subject_code" ,
547
+ )
535
548
self .objectcontactmoment_old = generate_oas_component_cached (
536
549
"cmc" ,
537
550
"schemas/Objectcontactmoment" ,
@@ -548,6 +561,14 @@ def setUp(self):
548
561
object_type = "zaak" ,
549
562
contactmoment = self .contactmoment_new ["url" ],
550
563
)
564
+ self .objectcontactmoment_balie = generate_oas_component_cached (
565
+ "cmc" ,
566
+ "schemas/Objectcontactmoment" ,
567
+ url = f"{ CONTACTMOMENTEN_ROOT } objectcontactmomenten/bb51784c-fa2c-4f65-b24e-7179b615efac" ,
568
+ object = self .zaak ["url" ],
569
+ object_type = "zaak" ,
570
+ contactmoment = self .contactmoment_balie ["url" ],
571
+ )
551
572
self .objectcontactmoment_eherkenning = generate_oas_component_cached (
552
573
"cmc" ,
553
574
"schemas/Objectcontactmoment" ,
@@ -625,8 +646,10 @@ def _setUpMocks(self, m, use_eindstatus=True):
625
646
self .status_type_finish ,
626
647
self .contactmoment_old ,
627
648
self .contactmoment_new ,
649
+ self .contactmoment_balie ,
628
650
self .objectcontactmoment_old ,
629
651
self .objectcontactmoment_new ,
652
+ self .objectcontactmoment_balie ,
630
653
]:
631
654
m .get (resource ["url" ], json = resource )
632
655
@@ -707,7 +730,11 @@ def _setUpMocks(self, m, use_eindstatus=True):
707
730
m .get (
708
731
f"{ CONTACTMOMENTEN_ROOT } objectcontactmomenten?object={ self .zaak ['url' ]} " ,
709
732
json = paginated_response (
710
- [self .objectcontactmoment_old , self .objectcontactmoment_new ]
733
+ [
734
+ self .objectcontactmoment_old ,
735
+ self .objectcontactmoment_new ,
736
+ self .objectcontactmoment_balie ,
737
+ ]
711
738
),
712
739
)
713
740
@@ -719,7 +746,11 @@ def _setUpMocks(self, m, use_eindstatus=True):
719
746
m .get (
720
747
f"{ CONTACTMOMENTEN_ROOT } objectcontactmomenten?object={ self .zaak ['url' ]} " ,
721
748
json = paginated_response (
722
- [self .objectcontactmoment_old , self .objectcontactmoment_new ]
749
+ [
750
+ self .objectcontactmoment_old ,
751
+ self .objectcontactmoment_new ,
752
+ self .objectcontactmoment_balie ,
753
+ ]
723
754
),
724
755
)
725
756
@@ -870,6 +901,9 @@ def test_status_is_retrieved_when_user_logged_in_via_digid(
870
901
status_new_obj .statustype = factory (StatusType , self .status_type_new )
871
902
status_finish_obj .statustype = factory (StatusType , self .status_type_finish )
872
903
904
+ self .openklant_config .exclude_contactmoment_kanalen = ["Balie" ]
905
+ self .openklant_config .save ()
906
+
873
907
response = self .app .get (self .case_detail_url , user = self .user )
874
908
875
909
case = response .context .get ("case" )
@@ -1049,6 +1083,7 @@ def test_pass_endstatus_type_data_if_endstatus_not_reached(self, m):
1049
1083
"new_docs" : False ,
1050
1084
"questions" : [
1051
1085
make_contactmoment (self .contactmoment_new ),
1086
+ make_contactmoment (self .contactmoment_balie ),
1052
1087
make_contactmoment (self .contactmoment_old ),
1053
1088
],
1054
1089
},
@@ -1058,7 +1093,7 @@ def test_pass_endstatus_type_data_if_endstatus_not_reached(self, m):
1058
1093
doc = PyQuery (response .text )
1059
1094
links = doc .find (".contactmomenten__link" )
1060
1095
1061
- self .assertEqual (len (links ), 2 )
1096
+ self .assertEqual (len (links ), 3 )
1062
1097
self .assertEqual (
1063
1098
links [0 ].attrib ["href" ],
1064
1099
reverse (
@@ -1068,6 +1103,13 @@ def test_pass_endstatus_type_data_if_endstatus_not_reached(self, m):
1068
1103
)
1069
1104
self .assertEqual (
1070
1105
links [1 ].attrib ["href" ],
1106
+ reverse (
1107
+ "cases:kcm_redirect" ,
1108
+ kwargs = {"uuid" : uuid_from_url (self .contactmoment_balie ["url" ])},
1109
+ ),
1110
+ )
1111
+ self .assertEqual (
1112
+ links [2 ].attrib ["href" ],
1071
1113
reverse (
1072
1114
"cases:kcm_redirect" ,
1073
1115
kwargs = {"uuid" : uuid_from_url (self .contactmoment_old ["url" ])},
0 commit comments