summaryrefslogtreecommitdiff
path: root/src/mailman/model/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* Use a property for HeaderMatch.indexAurélien Bompard2016-02-291-3/+17
| | | | | Moving header matches up and down the stack is more transparent that way.
* The order of a mailing list's header matches is significantAurélien Bompard2016-02-291-27/+149
| | | | | | | Add a numerical index property to HeaderMatch objects, and change the HeaderMatchSet manager to take the order into account. Items can now be inserted and removed by index.
* Prevent moderation of messages held for a different list.Barry Warsaw2016-02-071-0/+7
| | | | Closes: #161
* Fix membership query for preferred addresses.Barry Warsaw2016-02-061-0/+31
| | | | | | | When multiple users are subscribed to a mailing list via their preferred address, too many results are returned from a membership query, resulting in an assertion error. Reported by Darrell Kresge. (Closes: #190)
* Add a set_preferred() helper.Barry Warsaw2016-02-065-37/+17
| | | | | This refactors the setting of a user's preferred address to the first in their list of linked addresses.
* Boost coverage.Barry Warsaw2016-01-251-1/+18
| | | | Also, ignore `raise AssertionError` lines globally.
* Branch tweaks:Barry Warsaw2016-01-141-4/+12
| | | | | | | | - Fix an interface description. - Fix a copyright year. - Fix quote styles. - Tweak a test. - Add a test.
* Delete bans when their associated list is deletedAurélien Bompard2016-01-141-0/+46
| | | | Also add indexes on the Ban fields that are filtered on.
* Several optimizations:Barry Warsaw2016-01-113-1/+26
| | | | | | | | | | | | * Use `yield from` wherever appropriate. * Use SA's .one_or_none() where appropriate. - Fix a bug in MailingList.pass_extensions. - Use ValueError in other places for consistency. - Remove unreached/nonsense code. - Simplify the SubscriptionService.find_member() and .find_members() implementations. - Boost coverage.
* Refactor some tests and documentation.Barry Warsaw2016-01-071-0/+260
| | | | | | Increase coverage. Add ISubscriptionService.find_member() as per discussion.
* Happy New Year.Barry Warsaw2016-01-0214-14/+14
|
* More coverage.Barry Warsaw2015-12-292-0/+10
|
* Implement suggestions from the reviewAurélien Bompard2015-12-161-4/+5
|
* Resolve conflicts.Barry Warsaw2015-12-161-2/+2
|
* Improve the unit test for the find methodAurélien Bompard2015-12-161-9/+28
|
* Make sure that Pendables always have a typeAurélien Bompard2015-12-161-1/+1
|
* Add a find method for pending requestsAurélien Bompard2015-12-161-4/+25
|
* Use the relationship cascade feature to delete key-valuesAurélien Bompard2015-12-161-0/+61
|
* Handle deleting nonexistent messages from the message store. Closes: #167Aurélien Bompard2015-12-021-6/+37
|
* When deleting an Address, dependencies must be deleted firstAurélien Bompard2015-11-211-0/+41
| | | | | SQLite doesn't not enforce foreign key constraints, but PostgreSQL does, and without this fix, IntegrityErrors get raised.
* Clean up pass through abompard's branch.Barry Warsaw2015-10-201-26/+37
|
* Use and interface for the set of header_matchesAurélien Bompard2015-10-201-1/+45
|
* For now, treat `DeliveryMode.summary_digests` the same as `.mime_digests`.Barry Warsaw2015-09-061-1/+0
| | | | | (Closes #141). Also, don't enqueue a particular digest if there are no recipients for that digest.
* Clean up maxking's branch a little bit.Barry Warsaw2015-08-041-7/+13
| | | | | | | * Sort the .delete()'s * Remove an unused import. * Renamed and documented some tests. * Support tox's new passenv setting.
* Add tests for autoresponserecordAbhilash Raj2015-08-031-2/+12
|
* Fix zope lookup error in the previous commitAbhilash Raj2015-08-031-1/+1
|
* Add tests for #115Abhilash Raj2015-08-031-0/+9
|
* * Messages now include a `Message-ID-Hash` as the replacement forBarry Warsaw2015-06-141-3/+40
| | | | | | `X-Message-ID-Hash` although the latter is still included for backward compatibility. Also be sure that all places which add the header use the same algorithm.
* * Mailing list subscription policy work flow has been completely rewritten.Barry Warsaw2015-04-154-65/+205
|\ | | | | | | | | | | It now properly supports email verification and subscription confirmation by the user, and approval by the moderator using unique tokens. ``IMailingList`` objects now have a ``subscription_policy`` attribute.
| * Full test suite passes.Barry Warsaw2015-04-141-33/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
| * Merge the member query fix branch.Barry Warsaw2015-04-141-1/+51
| |\
| | * Added IMember.subscriber to definitively return how a member is subscribed toBarry Warsaw2015-04-141-1/+51
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | the mailing list (via preferred address/user or explicit address). IMember.get_member() is defined to return the explicit address when members are subscribed in both ways. IMember.get_memberships() returns a sequence of length 0, 1, or 2 containing all the member records associated with the email address. Fixed the AbstractMemberRoster methods query to properly return subscriptions via the user's preferred address and via an explicit address.
| * Checkpointing.Barry Warsaw2015-04-141-64/+0
| |
| * * Give the workflow state manager a count method.Barry Warsaw2015-04-131-0/+20
| | | | | | | | | | * The workflow state manager no longer allows updates via .save(). * Restoring a workflow state evicts the record from the database.
| * Handle save/restore of the subscription workflow.Barry Warsaw2015-04-132-27/+32
| | | | | | | | | | | | | | | | | | | | To handle the case of restoring a saved workflow, allow the subscriber to be None in the constructor, but assert that it is not None after the first workflow step. Add setters/getters for handling save/restore. In the base workflow interface, rename key to token.
| * Trunk mergeBarry Warsaw2015-04-071-0/+93
| |\ | |/ |/|
* | Flesh out the domain interface, model, and tests. Clean up style.Barry Warsaw2015-04-061-13/+84
| |
* | Abhilash's branch, pre-cleaning.Barry Warsaw2015-04-061-1/+23
|\ \
| * | * implement left over methodsAbhilash Raj2015-04-061-15/+10
| | | | | | | | | | | | * add and remove owners using the address
| * | * Add `drop_column` inside sqlite check, fix indentationAbhilash Raj2015-03-311-10/+5
| | | | | | | | | | | | | | | | | | | | | | | | * Change `Owner` to `DomainOwner` * Fix indentation errors in docs * add multiple owners using `add_owners` * all dummy addresses should be using example.com, example.org to avoid conflict ever * add dummy tests
| * | add tests, fix docs, remove contact_addressAbhilash Raj2015-03-281-1/+33
| | |
| | * Refactorings and tests.Barry Warsaw2015-03-291-0/+110
| |/ |/| | | | | | | | | | | | | * Move the basic Workflow class to a module in mailman.app. * Rename the interface and model modules. * Update the configure.zcml. * Minor style fixes. * Add a test for the workflow model.
* | Merging in several refactorings, and a REST API change.Barry Warsaw2015-03-261-5/+37
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backward Incompatible REST API Changes: * The JSON representation for subscription holds now no longer contains the `password` key. Also, the `address` key has been renamed to `email` for consistency with established terminology and other usage. Other Internal API Changes: * IUserManager has grown a `make_user()` method. Refactorings: * Most uses in the test suite of add_member() have been replaced with a new version of the subscribe() helper. This reduces the surface area of this ancient internal API. Eventually add_member() will have to go away or significantly change with the subscription policy workflow. * hold_subscription() as well as the remaining instances of add_member() now use a namedtuple in their arguments, to keep the signatures manageable.
| * More tests of make_user().Barry Warsaw2015-03-211-5/+37
| |
* | LP: #1432239 - Make sure acceptable aliases are deleted before the mailingBarry Warsaw2015-03-241-1/+23
|/ | | | list is deleted.
* * When deleting a user object, make sure their preferences are also deleted.Barry Warsaw2015-03-201-6/+26
|\ | | | | | | Given by Abhishek. (LP: #1418276)
| * * When deleting a user object, make sure their preferences are also deleted.Barry Warsaw2015-03-201-6/+24
|/ | | | Given by Abhishek. (LP: #1418276)
* * A new API is provided to support non-production testing infrastructures,Barry Warsaw2015-02-131-0/+41
| | | | | | | | | | | | allowing a client to cull all orphaned UIDs via ``DELETE`` on ``<api>/reserved/uids/orphans``. Note that *no guarantees* of API stability will ever be made for resources under ``reserved``. (LP: #1420083) Also: - Allow @dbconnection methods to be @staticmethods taking only one argument, the store to perform the query on.
* * When creating a user with an email address, do not create the user recordBarry Warsaw2015-02-051-0/+50
| | | | | if the email address already exists. Given by Andrew Stuart. (LP: #1418280)
* Bump copyright years.Barry Warsaw2015-01-0412-12/+12
|