summaryrefslogtreecommitdiff
path: root/src/mailman/runners/tests/test_join.py
Commit message (Collapse)AuthorAgeFilesLines
* Bump copyright years.Barry Warsaw2017-01-041-1/+1
|
* Simplify the implementation.Barry Warsaw2016-10-171-3/+3
| | | | | | | | | | | | | | | | | | | | | | This merges the SubscriptionManager and UnsubscriptionManager into a single SubscriptionManager implementation that handles both register() and unregister(). This allows us to use direct class-based adaptation instead of the more clunky getAdapter() API. We can also eliminate the funky _get_workflow() implementation detail. This has a couple of side-effects. .confirm() must lookup the token in the pendings database and pull out the pending type, dispatching to the proper class depending on the type, or raising a LookupError if the token is None or there is no pendable associated with the given token. This feels like an acceptable trade-off. However, this *also* means that IWorkflowStateManager must lose its 'name' argument in its methods. That's because we won't actually know the name until its too late. Honestly, the name wasn't providing much value anyway (it was always the subclass's name), so losing that seems fine too. The complication here is that the name was a primary key in the 'workflowstate' table, so we need to add its removal in the database migration.
* IWorkflowManager -> ISubscriptionManagerBarry Warsaw2016-09-011-3/+3
|
* CheckpointingBarry Warsaw2016-09-011-1/+1
|
* Intermediate CommitAbhilash Raj2016-09-011-3/+4
|
* Clean up the runners directory.Barry Warsaw2016-03-251-29/+14
|
* Additional refactoring to use the QuerySequence wrapper, so that we can stillBarry Warsaw2016-01-061-1/+1
| | | | | | use len() and slicing on SQLAlchemy query results. We also don't need to list()-ify the results in the tests. This isn't perfect, but at least it doesn't introduce yet another layer violation.
* Make the members request pageableAurélien Bompard2016-01-061-1/+1
|
* Happy New Year.Barry Warsaw2016-01-021-1/+1
|
* Plumb the subscription policy through the REST API.Barry Warsaw2015-04-151-4/+6
|
* Prevent replay attacks with the confirmation token.Barry Warsaw2015-04-151-1/+1
|
* Full test suite passes.Barry Warsaw2015-04-141-0/+4
| | | | | | | | | | | | | * Make sure Registrar.discard() removces any workflow state manager state associated with the token, and that this is flushed to SA. * Adjust the email commands to the new IRegistrar API. * Update the IRegistrar interface. * Add IWorkflowStateManager.discard() and make `count` an attribute/property. * Mark two tests as expected failures due to LP: #1444184.
* Checkpointing.Barry Warsaw2015-04-141-1/+1
|
* Bump copyright years.Barry Warsaw2015-01-041-1/+1
|
* Remove huge amounts of now unnecessary file boilerplate.Barry Warsaw2014-12-221-5/+1
|
* Use listid instead of (fqdn) listname in the metadata pickle.Barry Warsaw2014-12-151-8/+8
| | | | | | load_external() now always opens in utf-8 mode. More test repair.
* Several internal improvements:Barry Warsaw2014-01-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | * New events: - ConfirmationNeededEvent is triggered when a pendable requiring confirmation is created. This allows us to define an event handler for this event which sends the user notification. - SubscriptionEvent is triggered when a member is added to a mailing list. This lets us define an event handler which sends the welcome message. * send_welcome_message() now takes a member parameter instead of an address, which lets us directly access the member's delivery mode and user display name (if the member has a user, which it might not in some cases). * Use the list id in the pendable record instead of the list name for robustness (the latter can change but the former is permanent). * Test more registration conditions. * In the bin/runner command line switch handling, default `verbose` to None instead of False. This makes it work better with nose's -E switch (log to stderr). * In call_api(), if a POST, PUT, or PATCH method is used and data is None, encode the empty dictionary; seems like the behavior of urlencode() has changed, so this is safer. * Fix style and pyflakes warnings.
* Bump copyright years.Barry Warsaw2014-01-011-1/+1
|
* Bump copyright years.Barry Warsaw2013-01-011-1/+1
|
* * Python 2.7 is not required. Python 2.6 is no longer officially supported.Barry Warsaw2012-10-311-4/+2
| | | | | The code base is now also `python2.7 -3` clean, although there are still some warnings in 3rd party dependencies. LP: #1073506
* Several fixes and cleanups, ostensibly to fix Python 2.6 support.Barry Warsaw2012-03-221-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | - email.iterators.body_line_iterator() cannot handle unicodes in Python 2.6, because it uses cStringIO.StringIO under the covers, and *that* can't handle unicode. This works fine in Python 2.7, so I override this for the tests only under 2.6 (the code itself isn't affected). - AddressError needs to str() its IAddress attribute explicitly in the __str__() method, otherwise under Python 2.6, you'll get unprintable reprs in the doctests. Again, this works correctly in 2.7, but EIBTI, so it can't hurt either way. - EmailError: a new exception, not related to AddressError. The reason for this it to conform to current nomenclature: "address" means an IAddress while "email" means a text email address. So InvalidEmailAddressError now derives from EmailError instead of AddressError because it gets passed a text email address, and because that is invalid, it never gets turned into an IAddress. The __str__() of this new base exception class does some tricky encoding to keep it compatible between Python 2.6 and 2.7. - UnverifiedAddressError derives from AddressError instead of the more generic MailmanError. - A few random code cleanups are included.
* * The `join` email command no longer accepts an `address=` argument. ItsBarry Warsaw2012-02-291-4/+100
| | | | | | | | | `digest=` argument now accepts the following values: `no` (for regular delivery), `mime`, or `plain`. Also: - Fix get_queue_messages() to properly sort on the string representation of a header, since it could be a Header instance.
* Make sure that an email subscription request is ignored for addresses whichBarry Warsaw2012-02-291-0/+40
| | | | are already members of the list.
* Don't try to double join someone via a single email command.Barry Warsaw2012-02-291-0/+93