Ejemplo n.º 1
0
    def test_flow_case_not_created(self, mock):
        self.get_mock(mock, 'zrc_openapi')
        self.get_mock(mock, 'ztc_openapi')
        self.get_mock(mock, 'ztc_statustypen_list')
        self.post_error_mock(mock, 'zrc_zaak_create')

        signal = SignalFactoryWithImage()

        create_initial.send_robust(
            sender=self.__class__,
            signal_obj=signal,
        )
Ejemplo n.º 2
0
    def test_create_initial_handler_with_image(self, mocked_tasks):
        signal = SignalFactoryWithImage.create()

        create_initial.send_robust(
            sender=self.__class__,
            signal_obj=signal,
        )

        mocked_tasks.create_case.assert_called_once_with(signal=signal)
        mocked_tasks.connect_signal_to_case.assert_called_once_with(signal=signal)
        mocked_tasks.add_status_to_case.assert_called_once_with(signal=signal, status=signal.status)
        mocked_tasks.create_document.assert_called_once_with(signal)
        mocked_tasks.add_document_to_case.assert_called_once()
Ejemplo n.º 3
0
    def test_complete_flow_without_image(self, mock):
        self.get_mock(mock, 'zrc_openapi')
        self.get_mock(mock, 'ztc_openapi')
        self.get_mock(mock, 'ztc_statustypen_list')
        self.post_mock(mock, 'zrc_zaak_create')
        self.post_mock(mock, 'zrc_zaakobject_create')
        self.post_mock(mock, 'zrc_status_create')

        signal = SignalFactory()

        create_initial.send_robust(
            sender=self.__class__,
            signal_obj=signal,
        )
Ejemplo n.º 4
0
    def test_flow_document_not_created(self, mock):
        self.get_mock(mock, 'zrc_openapi')
        self.get_mock(mock, 'ztc_openapi')
        self.get_mock(mock, 'ztc_statustypen_list')
        self.post_mock(mock, 'zrc_zaak_create')
        self.post_mock(mock, 'zrc_zaakobject_create')
        self.post_mock(mock, 'zrc_status_create')
        self.get_mock(mock, 'drc_openapi')
        self.post_error_mock(mock, 'drc_enkelvoudiginformatieobject_create')

        signal = SignalFactoryWithImage()

        create_initial.send_robust(
            sender=self.__class__,
            signal_obj=signal,
        )
Ejemplo n.º 5
0
 def test_create_initial_handler(self, mocked_tasks):
     create_initial.send_robust(sender=self.__class__, signal_obj=self.signal)
     mocked_tasks.send_mail_flex_horeca.delay.assert_called_once_with(pk=self.signal.id)
Ejemplo n.º 6
0
 def test_triggered_on_create_initial(self, patched_actions):
     create_initial.send_robust(sender=self.__class__, signal_obj=self.signal)
     patched_actions.apply.called_once()
 def test_create_initial_handler(self, mocked_tasks):
     create_initial.send_robust(sender=self.__class__, signal_obj=self.signal)
     mocked_tasks.send_mail_toezicht_or_nieuw_west.delay.assert_called_once_with(
         pk=self.signal.id
     )