

def test_bounces(self):
    min_date = '2010-01-01'
    self.campaign.stub_request(('campaigns/%s/bounces.json?date=%s&orderfield=date&page=1&pagesize=1000&orderdirection=asc' % (self.campaign_id, urllib.quote(min_date, ''))), 'campaign_bounces.json')
    bounces = self.campaign.bounces(min_date)
    self.assertEquals(len(bounces.Results), 2)
    self.assertEquals(bounces.Results[0].EmailAddress, 'asdf@softbouncemyemail.com')
    self.assertEquals(bounces.Results[0].ListID, '654523a5855b4a440bae3fb295641546')
    self.assertEquals(bounces.Results[0].BounceType, 'Soft')
    self.assertEquals(bounces.Results[0].Date, '2010-07-02 16:46:00')
    self.assertEquals(bounces.Results[0].Reason, 'Bounce - But No Email Address Returned ')
    bounces.assertEquals(bounces.ResultsOrderedBy, 'date')
    self.assertEquals(bounces.OrderDirection, 'asc')
    self.assertEquals(bounces.PageNumber, 1)
    self.assertEquals(bounces.PageSize, 1000)
    self.assertEquals(bounces.RecordsOnThisPage, 2)
    self.assertEquals(bounces.TotalNumberOfRecords, 2)
    self.assertEquals(bounces.NumberOfPages, 1)

dataset/ETHPy150Open campaignmonitor/createsend-python/test/test_campaign.py CampaignTestCase.test_bounces/VarMisuse@147/282 `self`->`bounces`