~barry/mailman/templatecache

« back to all changes in this revision

Viewing changes to src/mailman/model/tests/test_listmanager.py

  • Committer: Barry Warsaw
  • Date: 2012-01-30 15:37:16 UTC
  • Revision ID: barry@list.org-20120130153716-s9qx07i6i0rltyax
 * Held messages can now be moderated through the REST API.  Mailing list
   resources now accept a `held` path component.  GETing this returns all held
   messages for the mailing list.  POSTing to a specific request id under this
   url can dispose of the message using `Action` enums.
 * `IRequests` interface is removed.  Now just use adaptation from
   `IListRequests` directly (which takes an `IMailingList` object).
 * `handle_message()` now allows for `Action.hold` which is synonymous with
   `Action.defer` (since the message is already being held).
 * `IListRequests.get_request()` now takes an optional `request_type`
   argument to narrow the search for the given request.

- also, print_function is now a standard __future__ import.  The template has
  been updated, but add this to modules as you edit them.

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
    IListManager, ListCreatedEvent, ListCreatingEvent, ListDeletedEvent,
35
35
    ListDeletingEvent)
36
36
from mailman.interfaces.messages import IMessageStore
37
 
from mailman.interfaces.requests import IRequests
 
37
from mailman.interfaces.requests import IListRequests
38
38
from mailman.interfaces.subscriptions import ISubscriptionService
39
39
from mailman.interfaces.usermanager import IUserManager
40
40
from mailman.testing.helpers import (
120
120
        getUtility(IListManager).delete(self._ant)
121
121
        # This is a hack.  ListRequests don't access self._mailinglist in
122
122
        # their get_request() method.
123
 
        requestsdb = getUtility(IRequests).get_list_requests(None)
 
123
        requestsdb = IListRequests(self._bee)
124
124
        request = requestsdb.get_request(request_id)
125
125
        self.assertEqual(request, None)
126
126
        saved_message = getUtility(IMessageStore).get_message_by_id('<argon>')