summaryrefslogtreecommitdiff
path: root/src/mailman/model/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* 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.
* Add bounce registration and bounce events.Barry Warsaw2011-05-131-0/+46
|
* Ensure that a member's address cannot be changed to an address they do notBarry Warsaw2011-04-251-0/+25
| | | | control.
* Complete the ability to change a subscription address, both internally and viaBarry Warsaw2011-04-251-0/+79
| | | | | | | | | | | | | | the REST API. (LP: #643949) * New resource path in REST API: /addresses/<email>/memberships gets all the memberships for a given email address. * In the REST API, PUTting or PATCHing a list configuration now returns a 204 (No Content) success code instead of a 200 success code with an empty body. * When a user is subscribed with their preferred address, changing the preferred address also changes all subscriptions. * When a user is subscribed with a specific address, their subscription can be changed to any verified address they control. * Use a new naming scheme for doctests with multiple mailing lists.
* Give IMembers a unique member id. We have to do this in order to give them aBarry Warsaw2011-04-221-0/+48
| | | | | | | | | | | | | | | | | | | | | | | path at the root of the resource tree (i.e. /members/X) and because when members can be subscribed by their IUser record (for preferred address), their canonical location cannot contain the address they are subscribed with. When their preferred address changes (without otherwise touching their membership), this address will change and that's not good for a canonical location. Other changes: * Added IMember.member_id attribute * Added ISubscriptionService.get_member() so member records can be retrieve by member id. * We can now get individual members by id via the REST API. * Extend the UniqueIDFactory so that it can take a 'context' (defaulting to None). The context is only used in the testing infrastructure so that separate files can be used for user ids and member ids. Otherwise, we'd have gaps in those sequences. * When *not* in testing mode, ensure that UIDs cannot be reused by keeping a table of all UIDs ever handed out. We *should* never get collisions, but this ensures it. * Clean up mailman.sql
* * Move members.txt corner cases to unittests.Barry Warsaw2011-04-201-1/+0
| | | | | | | * Fix a case in a list's /members API where the listname is bogus. * Catch NotAMemberError form delete_member() and return not_found. * Refactor REST helpers so that call_api() can be used in unittests without doing any prints to stdout.
* Add some tests to ensure that the correct number of members are returned whenBarry Warsaw2011-04-172-0/+82
users are subscribed with their preferred addresses.