summaryrefslogtreecommitdiff
path: root/src/mailman/commands/tests
Commit message (Collapse)AuthorAgeFilesLines
* PR288 vettedBarry Warsaw2017-08-291-6/+8
|
* Convert to click for CLI optionsBarry Warsaw2017-07-2221-732/+1056
|
* Fix confirmation of unsubscription requests. (Closes: #294)Barry Warsaw2017-01-161-3/+29
|
* Bump up stale lock expiration date.Barry Warsaw2017-01-091-1/+1
| | | | | | Hopefully this will help fix intermittent failures on the Gitlab CI runners. 2 minutes appears to be too short since the MySQL tests can take longer than that to get to the lock claim attempt.
* Bump copyright years.Barry Warsaw2017-01-0411-11/+11
|
* Prevent the occasional CI/testsuite hang.Barry Warsaw2016-12-031-3/+55
| | | | | | This doesn't solve the underlying problem of why child processes (both runners and master) occasionally don't exit, but it prevents ugly timeouts in the CI infrastructure when that happens.
* 100% diffcovBarry Warsaw2016-10-211-0/+54
|
* Simplify the implementation.Barry Warsaw2016-10-171-5/+5
| | | | | | | | | | | | | | | | | | | | | | 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-6/+6
|
* Rebase mailman/mailman!180 and cleanup # noqaBarry Warsaw2016-07-281-1/+1
|
* New template system. Closes #249Barry Warsaw2016-07-161-2/+1
| | | | | The new template system is introduced for API 3.1. See ``src/mailman/rest/docs/templates.rst`` for details.
* Use contextlib.suppress() where appropriate.Barry Warsaw2016-04-301-13/+3
|
* Skip a test if readline isn't available.Barry Warsaw2016-04-291-0/+7
| | | | Closes #230
* Fix #228Barry Warsaw2016-04-221-0/+74
| | | | | | | | ``mailman shell`` now supports readline history if you set the ``[shell]history_file`` variable in mailman.cfg. Also, many useful names are pre-populated in the namespace of the shell. (Closes: #228) With test coverage.
* mailman subcommands commit transactionsBarry Warsaw2016-04-121-0/+28
| | | | | | Closes #223 Also: `mailman digests` has grown --verbose and -dry-run options.
* Import order flake8 plugin.Barry Warsaw2016-03-271-2/+2
| | | | Fix lots of import order errors discovered by the new plugin.
* Clean up the commands subdirectory.Barry Warsaw2016-03-249-127/+33
|
* A bit of pre-merge cleanup.Barry Warsaw2016-03-221-9/+22
| | | | | | | | | | | * Reorder some add_argument() parameters. * Reword some help text. * Reword some of the doctest language. * Clean up whitespace. * Minor coding style change in unittests. * Add another unittest. * Fix a docstring (not related to these change). * Add NEWS.
* Changed domain creation to True as defaultGurkirpal2016-03-221-1/+18
| | | | | | Added tests for domain option Updated docs for creating list from shell
* Happy New Year.Barry Warsaw2016-01-029-9/+9
|
* The ``mailman members`` command can now be used to display members based onBarry Warsaw2015-12-221-0/+153
| | | | | subscription roles. Also, the positional "list" argument can now accept list names or list-ids.
* Expose the "bump digest" and "send digest" functionality though the REST APIBarry Warsaw2015-12-221-1/+1
| | | | | | | via the ``<api>/lists/<list-id>/digest`` end-point. GETting this resource returns the ``next_digest_number`` and ``volume`` as the same values accessible through the list's configuraiton resource. POSTing to the resource with either ``send=True``, ``bump=True``, or both invokes the given action.
* Port bump-digests to MM3, via the `mailman digests` command.Barry Warsaw2015-12-221-2/+87
| | | | | Fix a buglet where if maybe_send_digest_now() was called before a digest has been prepared, a FileNotFoundError would be raised.
* Refactor bump_digest_number_and_volume() and maybe_send_digest_now() intoBarry Warsaw2015-12-221-6/+16
| | | | | | | | | their own module inside the mailman.app package. With the latter, remove the "all lists" functionality and require the mlist argument. We'll handle the "all lists" use case higher up the stack. Also, rename the send-digests handler digests since we'll next add the bump functionality.
* Add a test and a fix for the no-args version of `mailman send-digests`.Barry Warsaw2015-12-201-0/+66
|
* Add a send-digests subcommand to send list digests right now.Barry Warsaw2015-12-201-0/+287
| | | | | | | | | | | | | | * Add a `mailman send-digests` subcommand which replaces the functionality of the MM2.1 senddigests.py cronjob. * Use mlist.data_path where appropriate instead of crafting it from config.LIST_DATA_DIR. This makes it more consistent to switch to using the list-id as the data subdirectory. * Refactor the to_digest handler so that we can implement maybe_send_digest_now() for the internal API. * Fix some typos in subcommand --help summaries.
* Revert "Fix issue #3 by searching for the 'master' script in several possible"Barry Warsaw2015-11-011-1/+56
| | | | | | This reverts commit 8c471e067c4b31064c2f69c0afd048a7e756a429. The fix wasn't correct. Now we have a test for the expected behavior.
* * Fix the processing of subscription confirmation messages when the mailingBarry Warsaw2015-10-311-2/+84
| | | | list is set to confirm-then-moderate. (Closes #114)
* Core no longer depends on the standalone `mock` module. (Closes: #146)Barry Warsaw2015-09-222-2/+2
|
* Plumb the subscription policy through the REST API.Barry Warsaw2015-04-151-1/+2
|
* Prevent replay attacks with the confirmation token.Barry Warsaw2015-04-151-4/+1
|
* Checkpointing.Barry Warsaw2015-04-141-2/+4
|
* merge serverowner branchAbhilash Raj2015-03-271-1/+1
|\
| * all tests passing now (except doctests)Abhilash Raj2015-03-261-1/+1
| |
* | Test importing MM2 pickles with BounceInfo. Given by abompard.Barry Warsaw2015-03-271-0/+61
|\ \ | |/ |/|
| * Add a test for instance-containing pickle importAurélien Bompard2015-03-261-0/+56
|/
* * ``mailman lists --domain`` was not properly handling its arguments. GivenBarry Warsaw2015-03-131-0/+67
|\ | | | | | | by Manish Gill. (LP: #1166911)
* \ Documentation fixes, given by Abhilash Raj.Barry Warsaw2015-03-131-3/+1
|\ \
| * | change bin/mailman to mailman everwhere in docsAbhilash Raj2015-03-121-2/+2
|/ /
* | We don't need the 'six' package any more.Barry Warsaw2015-01-041-1/+1
| |
* | Bump copyright years.Barry Warsaw2015-01-045-5/+5
| |
* | Remove huge amounts of now unnecessary file boilerplate.Barry Warsaw2014-12-225-18/+3
| |
* | Port some of the commands.Barry Warsaw2014-12-131-2/+2
| |
* | Checkpointing.Barry Warsaw2014-11-302-5/+5
| | | | | | | | | | | | | | | | | | | | By using `six` I think I have most of the imports squared away. There's probably still uses of `unicode` built-ins that need fixing. The idea is to first get the test suite running (which it doesn't yet), and then to fix tests. There's a bug in lazr.config which requires us to patch it for now.
* | Use print functions consistently through, and update all __future__ imports toBarry Warsaw2014-04-282-3/+5
| | | | | | | | | | | | | | | | reflect this. Also, mock out sys.stderr on some tests so that their nose2 output is quieter. A few other minor coding style consistencies.
* | Several internal improvements:Barry Warsaw2014-01-061-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-015-5/+5
| |
* | * When --sort is used, watch out for continuation lines, which shouldn't getBarry Warsaw2013-10-181-1/+6
| | | | | | | | | | | | sorted. * Fix stderr output in sub-runners, and move the -e test option to -E.