Exemple #1
0
 def test_get_documents_1(self):
     """Einfacher Abruf eines Dokuments ohne weitere Details"""
     docs = dispatch.get_documents(['2021/2011'])
     self.assertEqual(len(docs), 1)
     self.assertEqual(len(docs['2021/2011']), 1)
     self.assertNotEqual(docs['2021/2011'][0]['url'], None)
     self.assertEqual(docs['2021/2011'][0]['title'],
         u'Schlie\xdfung Wachsfabrik K\xf6ln AN/0856/2011')
     self.assertEqual(docs['2021/2011'][0]['original_url'],
         'http://ratsinformation.stadt-koeln.de/ag0050.asp?__kagnr=28125')
     self.assertEqual(docs['2021/2011'][0]['date'], '2011-05-18')
     self.assertEqual(docs['2021/2011'][0]['reference'], u'2021/2011')
     self.assertEqual(docs['2021/2011'][0]['type'],
         u'Mitteilung/Beantwortung - BV')
Exemple #2
0
 def test_get_documents_1(self):
     """Einfacher Abruf eines Dokuments ohne weitere Details"""
     docs = dispatch.get_documents(['2021/2011'])
     self.assertEqual(len(docs), 1)
     self.assertEqual(len(docs['2021/2011']), 1)
     self.assertNotEqual(docs['2021/2011'][0]['url'], None)
     self.assertEqual(docs['2021/2011'][0]['title'],
                      u'Schlie\xdfung Wachsfabrik K\xf6ln AN/0856/2011')
     self.assertEqual(
         docs['2021/2011'][0]['original_url'],
         'http://ratsinformation.stadt-koeln.de/ag0050.asp?__kagnr=28125')
     self.assertEqual(docs['2021/2011'][0]['date'], '2011-05-18')
     self.assertEqual(docs['2021/2011'][0]['reference'], u'2021/2011')
     self.assertEqual(docs['2021/2011'][0]['type'],
                      u'Mitteilung/Beantwortung - BV')
Exemple #3
0
 def test_get_documents_2(self):
     """Dokumentenabruf mit zusaetzlichen Details"""
     docs = dispatch.get_documents(references=['AN/0438/2010'],
                                   get_attachments=True,
                                   get_thumbnails=True,
                                   get_consultations=True)
     self.assertTrue(len(docs) == 1)
     con = docs['AN/0438/2010'][0]['consultations']
     att = docs['AN/0438/2010'][0]['attachments']
     thumb = att[0]['thumbnails']
     # testing consultation
     self.assertNotEqual(con[0]['agendaitem_title'], None)
     self.assertNotEqual(con[0]['committee_id'], None)
     self.assertNotEqual(con[0]['agendaitem_number'], None)
     self.assertNotEqual(con[0]['date'], None)
     self.assertNotEqual(con[0]['committee_name'], None)
     self.assertNotEqual(con[0]['session_description'], None)
     self.assertTrue('agendaitem_result' in con[0])
     # test attachments
     self.assertNotEqual(att, None)
     self.assertTrue(len(att) > 0)
     self.assertTrue('last_modified' in att[0])
     self.assertNotEqual(att[0]['numpages'], None)
     self.assertNotEqual(att[0]['url'], None)
     self.assertNotEqual(att[0]['filename'], None)
     self.assertNotEqual(att[0]['content'], None)
     self.assertNotEqual(att[0]['type'], None)
     self.assertNotEqual(att[0]['id'], None)
     self.assertNotEqual(att[0]['size'], None)
     self.assertEqual(att[0]['exclusion'], None)
     # test attachment thumbnails
     self.assertTrue('thumbnails' in att[0])
     self.assertNotEqual(thumb, None)
     self.assertTrue(len(thumb) > 0)
     self.assertNotEqual(thumb[0]['url'], None)
     self.assertNotEqual(thumb[0]['width'], None)
     self.assertNotEqual(thumb[0]['height'], None)
     self.assertNotEqual(thumb[0]['page'], None)
Exemple #4
0
 def test_get_documents_2(self):
     """Dokumentenabruf mit zusaetzlichen Details"""
     docs = dispatch.get_documents(references=['AN/0438/2010'],
             get_attachments=True, get_thumbnails=True,
             get_consultations=True)
     self.assertTrue(len(docs) == 1)
     con = docs['AN/0438/2010'][0]['consultations']
     att = docs['AN/0438/2010'][0]['attachments']
     thumb = att[0]['thumbnails']
     # testing consultation
     self.assertNotEqual(con[0]['agendaitem_title'], None)
     self.assertNotEqual(con[0]['committee_id'], None)
     self.assertNotEqual(con[0]['agendaitem_number'], None)
     self.assertNotEqual(con[0]['date'], None)
     self.assertNotEqual(con[0]['committee_name'], None)
     self.assertNotEqual(con[0]['session_description'], None)
     self.assertTrue('agendaitem_result' in con[0])
     # test attachments
     self.assertNotEqual(att, None)
     self.assertTrue(len(att) > 0)
     self.assertTrue('last_modified' in att[0])
     self.assertNotEqual(att[0]['numpages'], None)
     self.assertNotEqual(att[0]['url'], None)
     self.assertNotEqual(att[0]['filename'], None)
     self.assertNotEqual(att[0]['content'], None)
     self.assertNotEqual(att[0]['type'], None)
     self.assertNotEqual(att[0]['id'], None)
     self.assertNotEqual(att[0]['size'], None)
     self.assertEqual(att[0]['exclusion'], None)
     # test attachment thumbnails
     self.assertTrue('thumbnails' in att[0])
     self.assertNotEqual(thumb, None)
     self.assertTrue(len(thumb) > 0)
     self.assertNotEqual(thumb[0]['url'], None)
     self.assertNotEqual(thumb[0]['width'], None)
     self.assertNotEqual(thumb[0]['height'], None)
     self.assertNotEqual(thumb[0]['page'], None)