def constituent_email_for_constituent_id(cls, constituent_id):
     response = cls._get('/cons/get_constituents_by_id', {
         'cons_ids': constituent_id,
         'bundles': 'primary_cons_email'
     })
     charset = cls._api_response_charset(response)
     return xml_extractors.constituent_email(response.body.encode(charset))
Example #2
0
 def constituent_email_for_constituent_id(cls, constituent_id):
     response = cls._get('/cons/get_constituents_by_id',
             {'cons_ids': constituent_id, 'bundles': 'primary_cons_email'})
     charset = cls._api_response_charset(response)
     return xml_extractors.constituent_email(response.body.encode(charset))
 def test_correct_email_is_retrieved(self):
     eq_(extractors.constituent_email(cf()), '*****@*****.**')