def test_extract_properties(self):
        signal = SignalFactoryValidLocation()

        test_context = {
            'signal': signal,
            'resultaat_toelichting': 'Het probleem is opgelost',
            'resultaat_datum': '2018101111485276',
            'sequence_number': 20,
        }
        test_msg = render_to_string('sigmax/actualiseerZaakstatus_Lk01.xml',
                                    test_context)
        msg_content = _parse_actualiseerZaakstatus_Lk01(
            test_msg.encode('utf8'))

        # test uses knowledge of test XML message content
        self.assertEqual(msg_content['zaak_id'],
                         str(signal.sia_id) + '.20')  # TODO clean-up
        self.assertEqual(msg_content['datum_afgehandeld'],
                         test_context['resultaat_datum'])
        self.assertEqual(msg_content['resultaat'], 'Er is gehandhaafd')
        self.assertEqual(msg_content['reden'],
                         test_context['resultaat_toelichting'])
 def test_reject_not_xml(self):
     test_msg = b'THIS IS NOT XML'
     with self.assertRaises(lxml.etree.XMLSyntaxError):
         _parse_actualiseerZaakstatus_Lk01(test_msg)