summaryrefslogtreecommitdiff
path: root/src/mailman/app/tests
Commit message (Collapse)AuthorAgeFilesLines
* Move workflow tests to mailman.workflows.J08nY2017-08-073-1429/+0
|
* Migrate the [un]subscription_policy attribute.J08nY2017-08-074-198/+204
| | | | | | | | | - This is quite a huge commit, since it changes the type of the MailingList.subscription_policy and unsubscription_policy attributes to the new names of pluggable workflows, in all occurences. - Also adds a migration to migrate the attributes to the new types. - Adds tests for the migration.
* Save the complete workflow stack, not only last step.J08nY2017-08-071-1/+1
|
* Create mailman.workflows package. Move base Workflow there.J08nY2017-08-071-6/+6
| | | | | - Also introduce IWorkflow, ISubscriptionWorkflow, IUnsubscriptionWorkflow.
* Fix the template name of the welcome message.Barry Warsaw2017-05-241-2/+3
| | | | | | | | | | | | | | | | | We did not previously complete the renaming of the templates. Rename: * user:ack:welcome -> list:user:notice:welcome * user:ack:goodbye -> list:user:notice:goodbye The new names are what are actually used in send_welcome_message() and send_goodbye_message() so the old names were actually never used. NOTE: If you added welcome or goodbye templates through REST from git head, the old names will not be used. Given that this wasn't a feature in 3.0, and the above use case is very unlikely, I've decided not to do a migration. If anybody is affected, the changes can be made manually in withlist. Closes: #337
* Moved InvalidListNameError class definition to mailman.interfaces.mailinglist.Mark Sapiro2017-02-201-2/+2
| | | | | Added more documentation on config.mailman.listname_chars. Made a couple of minor tweaks.
* Updated rest/lists.py to handle list name error exceptions and addedMark Sapiro2017-02-191-1/+1
| | | | | | tests for for the exceptions. Enhanced the InvalidListNameError exception to return the invalid name.
* Replaced assertEqual with assertRegex to account for difference in errorMark Sapiro2017-02-191-5/+6
| | | | messages between python versions.
* Made the allowable list name characters configurable.Mark Sapiro2017-02-191-0/+23
|
* Implemented stricter listname validation.Mark Sapiro2017-02-191-1/+8
|
* Skip a test if run as root, as can happen with GL shared runnersBarry Warsaw2017-02-191-0/+1
|
* Bump copyright years.Barry Warsaw2017-01-0411-11/+11
|
* Fix flake8 errors.Mark Sapiro2016-12-042-2/+4
|
* Fix tests for test-owner instead of moderator's address.Mark Sapiro2016-12-042-2/+2
|
* Minor style cleanup.Barry Warsaw2016-11-241-23/+23
|
* Fix an API callAurélien Bompard2016-11-211-1/+1
|
* Run the workflows at the end of the tests to clean things upAurélien Bompard2016-11-211-0/+5
|
* Handle a missing user when a workflow is restored.Aurélien Bompard2016-11-211-0/+37
| | | | | | Between the creation of a subscription workflow and its approval, the user may have been merged with another user. In this case, use the associated address to find the new user.
* Workflow: support dependencies between attributesAurélien Bompard2016-11-211-0/+53
| | | | | | Restore the attributes in the order they are declared in `SAVE_ATTRIBUTES` to allow for dependencies between attributes (required by the `SubscriptionWorkflow`).
* Fix a flake8 error.Barry Warsaw2016-11-131-1/+1
|
* Closes: #68Barry Warsaw2016-11-132-10/+22
| | | | | Messages sent to the list's moderators now include the actual recipient addresses. Given by Tom Briles.
* Issue 68: send messages to list moderators when tomoderators=TrueTom Briles2016-10-312-2/+15
|
* 99% test coverage.Barry Warsaw2016-10-213-25/+177
| | | | | | | | | Also: * Ignore coverage in the testing submodule. * Remove some unreachable code. * Spelling. * Fix a bug in run_thru().
* Simplify the implementation.Barry Warsaw2016-10-174-26/+6
| | | | | | | | | | | | | | | | | | | | | | 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.
* flake8 fixes.Barry Warsaw2016-10-163-4/+3
|
* Split registration (subscription) and unsubscription:Barry Warsaw2016-09-131-2/+2
| | | | | | | | * events * notices * handlers Also, be sure to do only one `leave` command per email.
* Fix more tests.Barry Warsaw2016-09-111-2/+2
|
* More test fixes.Barry Warsaw2016-09-091-8/+10
|
* A few more changes.Barry Warsaw2016-09-081-2/+2
|
* Remove workflowmanager.pyBarry Warsaw2016-09-021-1/+1
|
* CheckpointingBarry Warsaw2016-09-013-32/+27
|
* Intermediate CommitAbhilash Raj2016-09-014-8/+423
|
* New template system. Closes #249Barry Warsaw2016-07-165-158/+58
| | | | | The new template system is introduced for API 3.1. See ``src/mailman/rest/docs/templates.rst`` for details.
* Fixes #237Barry Warsaw2016-06-031-10/+27
| | | | | Nonmember subscriptions are removed when one of the addresses controlled by a user is subscribed as a member. Given by Aditya Divekar. (Closes #237)
* Add test to check deletion of nonmmeber record.Aditya2016-05-311-0/+20
|
* Use contextlib.suppress() where appropriate.Barry Warsaw2016-04-301-3/+2
|
* Import order flake8 plugin.Barry Warsaw2016-03-272-3/+3
| | | | Fix lots of import order errors discovered by the new plugin.
* First massive round of cleanups.Barry Warsaw2016-03-2311-230/+116
| | | | | | | | * Get rid of explicit __all__ settings and use the @public decorator. * Get rid of ^L's * Use expected_count argument for get_queue_messages() * Various code modernizations. * Other minor changes to make flake8 happy.
* Clean ups for merge.Barry Warsaw2016-03-231-48/+34
| | | | | | | | * Update some comments. * Slightly rewrite a conditional test. * Coding style fixes. * Add a convenience to get_queue_message(). * Add NEWS.
* Add test for checking the member display nameAditya2016-03-231-1/+87
|
* Fix cross-posting held on more than one list.Barry Warsaw2016-03-081-23/+13
| | | | | | | | | | | Closes #176 Also: * IMessageStore no longer raises a ValueError if the Message-ID already exists in the store; it just returns None. * The internal handle_message() function no longer takes a `preserve` argument, since messages are never removed from the IMessageStore.
* Add a set_preferred() helper.Barry Warsaw2016-02-061-7/+4
| | | | | This refactors the setting of a user's preferred address to the first in their list of linked addresses.
* Boost coverage and remove dead code.Barry Warsaw2016-01-251-0/+8
|
* Boost coverage.Barry Warsaw2016-01-081-0/+20
|
* Refactor some tests and documentation.Barry Warsaw2016-01-071-202/+2
| | | | | | Increase coverage. Add ISubscriptionService.find_member() as per discussion.
* Additional refactoring to use the QuerySequence wrapper, so that we can stillBarry Warsaw2016-01-061-8/+8
| | | | | | 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-8/+8
|
* Happy New Year.Barry Warsaw2016-01-0211-11/+11
|
* More coverage.Barry Warsaw2015-12-291-0/+15
|
* Refactor bump_digest_number_and_volume() and maybe_send_digest_now() intoBarry Warsaw2015-12-221-0/+237
| | | | | | | | | 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.