Пример #1
0
 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', {}))
Пример #2
0
 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', {}))
Пример #3
0
 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', {}))
Пример #4
0
 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', {}))
Пример #5
0
 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', {}))
Пример #6
0
 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', {}))
Пример #7
0
 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', {}))
Пример #8
0
 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'}))
Пример #9
0
 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', {}))
Пример #10
0
 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"}))
Пример #11
0
 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}))
Пример #12
0
 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', {}))
Пример #13
0
 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', {}))
Пример #14
0
 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', {}))
Пример #15
0
 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}))
Пример #16
0
 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
                      }))
Пример #17
0
 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'
                      }))
Пример #18
0
 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
     }))
Пример #19
0
 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"
                      }))
Пример #20
0
 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', {}))