def test_can_get_customer_share_for_mailing(self): MockAdapter.expected = {} report = get_report(self.account, Report.CustomerShare, 123) self.assertIsInstance(report, dict) self.assertEqual(self.account.adapter.called, 1) self.assertEqual(self.account.adapter.call, ('GET', '/response/123/customer_share', {}))
def test_can_get_response_summary_for_mailing(self): MockAdapter.expected = {} report = get_report(self.account, Report.MailingSummary, 123) self.assertIsInstance(report, dict) self.assertEqual(self.account.adapter.called, 1) self.assertEqual(self.account.adapter.call, ('GET', '/response/123', {}))
def test_can_get_customer_share_clicks_list_for_mailing(self): MockAdapter.expected = [] report = get_report(self.account, Report.CustomerShareClicksList, 123) self.assertIsInstance(report, list) self.assertEqual(self.account.adapter.called, 1) self.assertEqual(self.account.adapter.call, ('GET', '/response/123/customer_share_clicks', {}))
def test_can_get_shares_overview_for_mailing(self): MockAdapter.expected = [] report = get_report(self.account, Report.SharesOverview, 123) self.assertIsInstance(report, list) self.assertEqual(self.account.adapter.called, 1) self.assertEqual(self.account.adapter.call, ('GET', '/response/123/shares/overview', {}))
def test_can_get_links_list_for_mailing(self): MockAdapter.expected = [] report = get_report(self.account, Report.LinkList, 123) self.assertIsInstance(report, list) self.assertEqual(self.account.adapter.called, 1) self.assertEqual(self.account.adapter.call, ('GET', '/response/123/links', {}))
def test_can_get_response_summary(self): MockAdapter.expected = [] report = get_report(self.account, Report.ResponseSummary) self.assertIsInstance(report, list) self.assertEquals(self.account.adapter.called, 1) self.assertEquals( self.account.adapter.call, ('GET', '/response', {}))
def test_can_get_links_list_for_mailing(self): MockAdapter.expected = [] report = get_report(self.account, Report.LinkList, 123) self.assertIsInstance(report, list) self.assertEquals(self.account.adapter.called, 1) self.assertEquals( self.account.adapter.call, ('GET', '/response/123/links', {}))
def test_can_get_deliveries_list_for_mailing2(self): MockAdapter.expected = [] report = get_report(self.account, Report.DeliveredList, 123, {'del_status': DeliveryType.Delivered}) self.assertIsInstance(report, list) self.assertEquals(self.account.adapter.called, 1) self.assertEquals( self.account.adapter.call, ('GET', '/response/123/deliveries', {'del_status': 'd'}))
def test_can_get_response_summary_for_mailing(self): MockAdapter.expected = {} report = get_report(self.account, Report.MailingSummary, 123) self.assertIsInstance(report, dict) self.assertEquals(self.account.adapter.called, 1) self.assertEquals( self.account.adapter.call, ('GET', '/response/123', {}))
def test_can_get_response_summary3(self): MockAdapter.expected = [] report = get_report(self.account, Report.ResponseSummary, params={'range': "2011-04-01~2011-09-01"}) self.assertIsInstance(report, list) self.assertEquals(self.account.adapter.called, 1) self.assertEquals( self.account.adapter.call, ('GET', '/response', {'range': "2011-04-01~2011-09-01"}))
def test_can_get_response_summary2(self): MockAdapter.expected = [] report = get_report(self.account, Report.ResponseSummary, params={'include_archived': True}) self.assertIsInstance(report, list) self.assertEquals(self.account.adapter.called, 1) self.assertEquals( self.account.adapter.call, ('GET', '/response', {'include_archived': True}))
def test_can_get_shares_overview_for_mailing(self): MockAdapter.expected = [] report = get_report(self.account, Report.SharesOverview, 123) self.assertIsInstance(report, list) self.assertEquals(self.account.adapter.called, 1) self.assertEquals( self.account.adapter.call, ('GET', '/response/123/shares/overview', {}))
def test_can_get_customer_share_for_mailing(self): MockAdapter.expected = {} report = get_report(self.account, Report.CustomerShare, 123) self.assertIsInstance(report, dict) self.assertEquals(self.account.adapter.called, 1) self.assertEquals( self.account.adapter.call, ('GET', '/response/123/customer_share', {}))
def test_can_get_customer_share_clicks_list_for_mailing(self): MockAdapter.expected = [] report = get_report(self.account, Report.CustomerShareClicksList, 123) self.assertIsInstance(report, list) self.assertEquals(self.account.adapter.called, 1) self.assertEquals( self.account.adapter.call, ('GET', '/response/123/customer_share_clicks', {}))
def test_can_get_clicks_list_for_mailing3(self): MockAdapter.expected = [] report = get_report(self.account, Report.ClickList, 123, {'link_id': 1024}) self.assertIsInstance(report, list) self.assertEquals(self.account.adapter.called, 1) self.assertEquals( self.account.adapter.call, ('GET', '/response/123/clicks', {'link_id': 1024}))
def test_can_get_clicks_list_for_mailing3(self): MockAdapter.expected = [] report = get_report(self.account, Report.ClickList, 123, {'link_id': 1024}) self.assertIsInstance(report, list) self.assertEqual(self.account.adapter.called, 1) self.assertEqual(self.account.adapter.call, ('GET', '/response/123/clicks', { 'link_id': 1024 }))
def test_can_get_deliveries_list_for_mailing2(self): MockAdapter.expected = [] report = get_report(self.account, Report.DeliveredList, 123, {'del_status': DeliveryType.Delivered}) self.assertIsInstance(report, list) self.assertEqual(self.account.adapter.called, 1) self.assertEqual(self.account.adapter.call, ('GET', '/response/123/deliveries', { 'del_status': 'd' }))
def test_can_get_response_summary2(self): MockAdapter.expected = [] report = get_report(self.account, Report.ResponseSummary, params={'include_archived': True}) self.assertIsInstance(report, list) self.assertEqual(self.account.adapter.called, 1) self.assertEqual(self.account.adapter.call, ('GET', '/response', { 'include_archived': True }))
def test_can_get_response_summary3(self): MockAdapter.expected = [] report = get_report(self.account, Report.ResponseSummary, params={'range': "2011-04-01~2011-09-01"}) self.assertIsInstance(report, list) self.assertEqual(self.account.adapter.called, 1) self.assertEqual(self.account.adapter.call, ('GET', '/response', { 'range': "2011-04-01~2011-09-01" }))
def test_can_get_response_summary(self): MockAdapter.expected = [] report = get_report(self.account, Report.ResponseSummary) self.assertIsInstance(report, list) self.assertEqual(self.account.adapter.called, 1) self.assertEqual(self.account.adapter.call, ('GET', '/response', {}))