示例#1
0
    def test_get_statusses(self, mock):
        url = (
            'https://ref.tst.vng.cloud/ztc/api/v1/catalogussen/' +
            '8ffb11f0-c7cc-4e35-8a64-a0639aeb8f18/zaaktypen/c2f952ca-298e-488c-b1be-a87f11bd5fa2/'
            + 'statustypen/70ae2e9d-73a2-4f3d-849e-e0a29ef3064e')
        self.get_mock(mock, 'zrc_openapi')
        self.get_mock(mock, 'zrc_status_list')
        self.get_mock(mock, 'ztc_openapi')
        self.get_mock(mock, 'ztc_statustypen_read', url=url)

        case_signal = CaseSignalFactory()
        self.assertEqual(case_signal.get_statusses(),
                         json.loads(self.ztc_statusses))
示例#2
0
 def test_get_statusses_existing_cache(self):
     case_signal = CaseSignalFactory()
     case_signal.cache_status_history = 'Random'
     self.assertEqual(case_signal.get_statusses(), 'Random')
示例#3
0
 def test_get_statusses_connection_error(self, mock):
     case_signal = CaseSignalFactory()
     self.get_exception_mock(mock, 'zrc_openapi', ConnectionError)
     self.assertIsNone(case_signal.get_statusses())