Esempio n. 1
0
 def test_medianet_investor_relations_format(self):
     filename = 'ED_867485_4_2.tst'
     dirname = os.path.dirname(os.path.realpath(__file__))
     fixture = os.path.normpath(os.path.join(dirname, '../fixtures', filename))
     self.provider['source'] = 'MNET'
     self.items = ZCZCMedianetParser().parse(fixture, self.provider)
     self.assertEqual(self.items.get('headline'), 'IRW News Release: Master Builders Australia')
Esempio n. 2
0
 def test_medianet_format(self):
     filename = 'ED_841066_2_1.tst'
     dirname = os.path.dirname(os.path.realpath(__file__))
     fixture = os.path.normpath(os.path.join(dirname, '../fixtures', filename))
     self.provider['source'] = 'MNET'
     self.items = ZCZCMedianetParser().parse(fixture, self.provider)
     self.assertEqual(self.items.get('headline'), 'Media Release: Australian Financial Security Authority')
     self.assertEqual(self.items.get('place')[0], {'qcode': 'FED', 'name': 'FED'})
     self.assertEqual(self.items.get('subject')[0]['qcode'], '04000000')
     self.assertEqual(len(self.items.get('anpa_take_key')), 24)
 def test_tabular_format(self):
     filename = 'ED_900942_2_1.tst'
     dirname = os.path.dirname(os.path.realpath(__file__))
     fixture = os.path.normpath(
         os.path.join(dirname, '../fixtures', filename))
     self.provider['source'] = 'MNET'
     self.items = ZCZCMedianetParser().parse(fixture, self.provider)
     self.assertTrue(
         self.items.get('body_html').startswith(
             '<pre>Media release distributed by AAP Medianet.'))
     self.assertTrue(
         self.items.get('body_html').find(
             '                    Dividend     Total Winners     '
             'Total Prizes Payable') != -1)