コード例 #1
0
    def test_update_old_msgs(self):
        address = u'*****@*****.**'
        archive_msg(self.store, 'sample8', address)
        get_digests(
            self.store,
            address)[0].scheduled_at = datetime.now() - timedelta(days=100)
        self.store._db.session.flush()

        self._test_update_no_msgs()
コード例 #2
0
    def _test_update(self, fileList, *addresses):
        for f in fileList:
            archive_msg(self.store, f, *addresses)

        self.assertTrue(self.distributor.update())

        for user in addresses:
            self.assertEqual(self.store.messages_for_user(user), [])
        self.assertEqual(self.sender.send.call_count, len(addresses))
コード例 #3
0
    def test_update_done_msgs(self):
        address = u'*****@*****.**'
        archive_msg(self.store, 'sample9', address)
        self.store.mark_digest_as_sent(address)

        self._test_update_no_msgs()