示例#1
0
 def test_combined_answers(self):
     filter = TKDocument.create_filter()
     filter.filter_aanhangselnummer('151601580')
     docs = TKApi.get_documenten(filter=filter)
     self.assertEqual(1, len(docs))
     doc = docs[0]
     overheidnl_document_id = 'ah-tk-20152016-1580'
     kamerantwoord = openkamer.kamervraag.create_kamerantwoord(
         doc, overheidnl_document_id)
     self.assertEqual(4, kamerantwoord.antwoord_set.count())
     antwoorden = kamerantwoord.antwoord_set.all()
     self.assertEqual(None, antwoorden[0].see_answer_nr)
     self.assertEqual(None, antwoorden[1].see_answer_nr)
     self.assertEqual(2, antwoorden[2].see_answer_nr)
     self.assertEqual(None, antwoorden[3].see_answer_nr)
示例#2
0
 def test_create_verslag(self):
     filter = TKDocument.create_filter()
     dossier_id = 26234
     kamerstuk_nr = 225
     filter.filter_dossier(dossier_id)
     filter.filter_volgnummer(kamerstuk_nr)
     docs = TKApi.get_documenten(filter=filter, max_items=10)
     self.assertEqual(1, len(docs))
     overheidnl_document_id = 'kst-{}-{}'.format(dossier_id, kamerstuk_nr)
     commissie = Commissie.objects.create(name='test commissie',
                                          name_short='tc',
                                          slug='tc')
     verslag = openkamer.verslagao.create_verslag(
         tk_document=docs[0],
         overheidnl_document_id=overheidnl_document_id,
         dossier_id=dossier_id,
         kamerstuk_nr=kamerstuk_nr,
         commissie=commissie)