summaryrefslogtreecommitdiff
path: root/src/mailman/model/tests (follow)
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* Remove huge amounts of now unnecessary file boilerplate.Barry Warsaw2014-12-2211-39/+5
|
* Add test module.Barry Warsaw2014-12-131-0/+74
|
* All model tests except for pendings.rst is passing now.Barry Warsaw2014-12-132-10/+21
|
* More model test fixes and ports.Barry Warsaw2014-12-133-4/+92
|
* model/addresses.rst passes, with some bad-path cases moved to unittests.Barry Warsaw2014-12-011-0/+22
|
* registrar.rst is ported; some bad path tests moved to a unittest.Barry Warsaw2014-12-011-0/+64
|
* Pass all tests with PYTHONWARNINGS=error.Barry Warsaw2014-09-221-2/+2
| | | | | | | | | | * Switch away from a deprecated unittest method. * Switch away from using deprecated Exceptions.message attribute. * Decode the bytes b32 encoded X-Message-ID-Hash header into a Unicode. * Fix a rather glaring bug in Pendings.add() where we were actually not properly coercing bytes to unicode for the keys and values! I guess it's a good thing that SQLAlchemy is more strict than Storm. * Some cosmetic fixes.
* Clean up pass.Barry Warsaw2014-09-221-4/+3
|
* Test repair:Barry Warsaw2014-09-211-0/+9
| | | | | | | | * Remove an unused import. * Add skips for all migration unit tests. * Fix model class attribute typo. * .values() returns tuples, so adjust for that. * Add a test.
* modify all storm queries to work with SAAbhilash Raj2014-09-121-4/+4
|
* Use print functions consistently through, and update all __future__ imports toBarry Warsaw2014-04-283-3/+3
| | | | | | | | reflect this. Also, mock out sys.stderr on some tests so that their nose2 output is quieter. A few other minor coding style consistencies.
* Add an email address to an existing user via the REST API.Barry Warsaw2014-04-141-0/+43
|\
| * Instantiating an Address model now validates the email stringFlorian Fuchs2014-04-141-0/+45
|/
* * Fix IntegrityError (against PostgreSQL) when deleting a list with contentBarry Warsaw2014-03-151-0/+15
| | | | filters. Given by Aurélien Bompard. (LP: #1117174)
* * Module coding style consistency.Barry Warsaw2014-03-021-2/+10
| | | | | | | * handle_SubscriptionEvent(): We're always guaranteed to get a language from a member, since lookup falls back ultimately to the system preferences. So this method can be simplified. * Bump up code coverage for several modules.
* Bump copyright years.Barry Warsaw2014-01-019-9/+9
|
* More fixes.Barry Warsaw2013-11-261-1/+5
|
* Checkpointing.Barry Warsaw2013-11-253-1/+108
|
* Migrate bounceevent.list_name -> bounceevent.list_idBarry Warsaw2013-09-011-2/+2
| | | | | | | * Rename StormBaseDatabase._create() -> .initialize() * Refactor database initialization. * make_listid() helper. * Add a pivot() helper for schema migrations.
* * Creation of lists with upper case names should be coerced to lower case.Barry Warsaw2013-03-061-0/+14
| | | | (LP: #1117176)
* Bump copyright years.Barry Warsaw2013-01-018-8/+8
|
* * Simplify moderator.rst and requests.rst so they serve a better purpose asBarry Warsaw2012-12-171-4/+17
| | | | | | | | | | documentation. Move non-documentation tests into a separate unittest file. * Separate out the doctests for IRequest from the doctests for app/moderator.py and place the latter in a separate file. * Fix typo in app/membership.py (s/send_goodbye_msg/send_goodbye_message), but LP: #1091321 tracks more needed fixes in this area.
* - Module modernization by adding the print_function() import.Barry Warsaw2012-04-221-11/+14
| | | | - Update many tests to use the transaction() context manager.
* * Add property `IRoster.member_count`.Barry Warsaw2012-03-151-0/+156
| | | | | Also, change the implementation of mailing list REST resource's member_count to use the more efficient implementation of IRoster.member_count.
* Clean up of style test code, along with refactoring of corner cases toBarry Warsaw2012-03-121-0/+3
| | | | unittests where they belong.
* * Held messages can now be moderated through the REST API. Mailing listBarry Warsaw2012-01-302-2/+68
| | | | | | | | | | | | | | | 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.
* copybumpBarry Warsaw2012-01-016-6/+6
|
* Remove extraneous `test_suite()` functions. zope.testrunner willBarry Warsaw2011-10-306-50/+0
| | | | | | | | | automatically do the right thing in most cases. Keep test_suite() in test_documentation.py since these dynamically set up docs tests properly. Refactor test_passwords.py so that base class tests aren't bogusly run. Also, remove test_membership.py which was essentially disabled because it was testing the MM2 membership API.
* * Four new events are created, and notifications are sent during domainBarry Warsaw2011-09-021-0/+113
| | | | | | | | | | lifecycle changes: - DomainCreatingEvent - sent before the domain is created - DomainCreatedEvent - sent after the domain is created - DomainDeletingEvent - sent before the domain is deleted - DomainDeletedEvent - sent after the domain is deleted * Using the above events, when a domain is deleted, associated mailing lists are deleted. (LP: #837526)
* * User and Member ids are now proper UUIDs. The UUIDs are pended as unicodes,Barry Warsaw2011-08-301-3/+11
| | | | | | | | | | | | | | | | | | and exposed to the REST API as their integer equivalents. They are stored in the database using Storm's UUID type. - ISubscriptionService.get_member() now takes a UUID - IUserManager.get_user_by_id() now takes a UUID * Moderators and owners can be added via REST (LP: #834130). Given by Stephen A. Goss. - add_member() grows a `role` parameter. - ISubscriptionService.join() grows a `role` parameter. * InvalidEmailAddressError no longer repr()'s its value. * `address` -> `email` for consistency - delete_member() - ISubscriptionService.leave() * Fixed typo in app/subscriptions.py __all__ * AlreadySubscribedError: attributes are now public. * More .txt -> .rst renames.
* Complete bug 827036 work.Barry Warsaw2011-08-172-42/+74
| | | | | | | | | | | * Add ListCreatingEvent and ListDeletingEvent. These are sent before the operation actually occurs, whereas the previously added ListCreatedEvent and ListDeletedEvent are sent after the operation. Specifically, this is necessary because request database deletion requires the IMailingList object, which is only available before the list is deleted. * Add a handler to clear out the requests database for a mailing list, when the mailing list is about to be deleted.
* Basic infrastructure for fixing bug 827036.Barry Warsaw2011-08-171-0/+33
| | | | | | | | | * Use zope.events to signal when a mailing list has been created or deleted. * Register a handler for the ListDeletedEvent which cleans up member subscriptions. * Relax the criteria for find_members(), both internally and in the REST API, so that the subscriber is not required. E.g. you can now find all members of a mailing list.
* Send event notifications whenever a mailing list is created or deleted.Barry Warsaw2011-08-162-2/+73
|
* * Flesh out IBounceProcessor so that you can get an iterator over all eventsBarry Warsaw2011-05-171-2/+61
| | | | | | | and over just the unprocessed events. * In the outgoing queue runner, work out the logic for when SomeRecipientsFailed with permanent failures in a probe message.