Пример #1
0
    def __init__(self, *args, **kwargs):
        super(APITest, self).__init__(*args, **kwargs)

        if not APITest.is_initialized:
            APITest.PELOSI_CRP_ID = 'N00007360'
            APITest.PELOSI = api.entity_search('Nancy Pelosi (D)')[0]['id']
            APITest.PICKENS = api.entity_search('T. Boone Pickens')[0]['id']
            APITest.BANKERS = api.entity_search('American Bankers Assn')[0]['id']
            APITest.VAN_SCOYOC = api.entity_search('Stewart Van Scoyoc')[0]['id']
            APITest.NICKLES = api.entity_search('Nickles Group')[0]['id']

            APITest.is_initialized = True
Пример #2
0
 def test_entity_search(self):
     self.assertLength(2, api.entity_search('pelosi'))