示例#1
0
 def setUp(self):
     Account.default_adapter = MockAdapter
     self.mailing = Mailing(
         Account(account_id="100", public_key="xxx", private_key="yyy"), {
             'mailing_id': 200,
             'delivery_ts':
             datetime.now().strftime(SERIALIZED_DATETIME_FORMAT),
             'clicked': None,
             'opened': None,
             'forwarded': None,
             'shared': None,
             'sent': datetime.now().strftime(SERIALIZED_DATETIME_FORMAT)
         })
示例#2
0
 def setUp(self):
     Account.default_adapter = MockAdapter
     self.messages = Mailing(
         Account(account_id="100", public_key="xxx", private_key="yyy"), {
             'mailing_id': 200
         }).messages
示例#3
0
 def test_fetch_all_returns_a_dictionary(self):
     mailing = Mailing(self.members.mailing.account)
     members = MailingMemberCollection(mailing)
     with self.assertRaises(ex.NoMailingIdError):
         members.fetch_all()
     self.assertEquals(members.mailing.account.adapter.called, 0)
示例#4
0
 def test_fetch_all_returns_a_dictionary(self):
     mailing = Mailing(self.groups.mailing.account)
     groups = MailingGroupCollection(mailing)
     with self.assertRaises(ex.NoMailingIdError):
         groups.fetch_all()
     self.assertEquals(groups.mailing.account.adapter.called, 0)