summaryrefslogtreecommitdiff
path: root/src/mailman/testing/helpers.py
Commit message (Collapse)AuthorAgeFilesLines
* PR288 vettedBarry Warsaw2017-08-291-1/+3
|
* Convert to click for CLI optionsBarry Warsaw2017-07-221-2/+3
|
* Remove the dependency on httplib2.Barry Warsaw2017-02-061-24/+10
| | | | Closes #42
* Bump copyright years.Barry Warsaw2017-01-041-1/+1
|
* Implement caching suffix list with in-tree fallback.Barry Warsaw2017-01-011-1/+6
| | | | | | | | Also: * Change doctest cleanups to be an ExitStack. * Added [dmarc]cache_lifetime setting. * Cleanup pass through dmarc-mitigation.rst. * Be sure the cached org domain file is cleaned up when the world is reset.
* Finish configuring flufl.testing.Barry Warsaw2016-11-301-0/+8
| | | | Also, use the better way to set the LMTP ident.
* Use `atpublic` for @public instead of internal copy.Barry Warsaw2016-11-291-1/+1
|
* Fix the Flake8 ignore tagsAurélien Bompard2016-11-211-1/+1
|
* Split registration (subscription) and unsubscription:Barry Warsaw2016-09-131-2/+6
| | | | | | | | * events * notices * handlers Also, be sure to do only one `leave` command per email.
* Rebase mailman/mailman!180 and cleanup # noqaBarry Warsaw2016-07-281-1/+1
|
* New template system. Closes #249Barry Warsaw2016-07-161-14/+11
| | | | | 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-7/+4
|
* Fix mailman shell processing of $PYTHONSTARTUP.Barry Warsaw2016-04-081-0/+20
| | | | Closes #224
* Don't use `flake8: noqa`.Barry Warsaw2016-04-011-1/+1
| | | | | | | This suppresses all errors in the file. Use `noqa`, although pep8 doesn't honor this for all errors. There may be a plugin which helps.
* Clean up the testing directory.Barry Warsaw2016-03-251-43/+23
|
* Clean ups for merge.Barry Warsaw2016-03-231-1/+6
| | | | | | | | * Update some comments. * Slightly rewrite a conditional test. * Coding style fixes. * Add a convenience to get_queue_message(). * Add NEWS.
* Add a set_preferred() helper.Barry Warsaw2016-02-061-0/+11
| | | | | This refactors the setting of a user's preferred address to the first in their list of linked addresses.
* Super duper.Barry Warsaw2016-01-261-4/+3
| | | | | * Python 3-ify super() calls. * Remove a bunch of obsolete exception classes.
* Several optimizations:Barry Warsaw2016-01-111-2/+1
| | | | | | | | | | | | * 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.
* Happy New Year.Barry Warsaw2016-01-021-1/+1
|
* Core no longer depends on the standalone `mock` module. (Closes: #146)Barry Warsaw2015-09-221-1/+1
|
* Extended test helper subscribe() which takes an optional email address andBarry Warsaw2015-03-261-8/+13
| | | | returns the newly created member.
* We don't need the 'six' package any more.Barry Warsaw2015-01-041-2/+2
|
* Bump copyright years.Barry Warsaw2015-01-041-1/+1
|
* Remove huge amounts of now unnecessary file boilerplate.Barry Warsaw2014-12-221-8/+4
|
* Trunk merge.Barry Warsaw2014-12-221-21/+19
|\
| * * Fixed `AttributeError` on MIME digest messages. Given by Aurélien Bompard.Barry Warsaw2014-12-101-1/+24
| |\ | | | | | | | | | (LP: #1130696)
| | * LP: #1130696 - AttributeError on .senderBarry Warsaw2014-12-101-0/+23
| |/|
| | * Make the MIMEDigester generate a subclass of MIMEMultipart with our additionsAurélien Bompard2014-12-091-0/+22
| |/ | | | | | | Fixes bug #1130696 (differently)
* | Move internationalized digest tests to unittests.Barry Warsaw2014-12-201-0/+25
| |
* | Better, but not perfect handler test passing.Barry Warsaw2014-12-151-2/+3
| |
* | Fix some basic REST plumbing, and make test_rosters pass.Barry Warsaw2014-12-111-1/+4
| |
* | Checkpointing.Barry Warsaw2014-11-301-6/+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.
* * Fixed Unicode errors in the digest runner and when sending messages to theBarry Warsaw2014-11-291-0/+5
| | | | | | | | | | | site owner as a fallback. Given by Aurélien Bompard. (LP: #1130957). Also: * Convert some uses of the unicode() built-in to bytes.decode() in preparation for Python 3 and to eliminate some pyflakes errors. * Added LogFileMark.read() as a convenience method.
* First pass at converting to falcon for the REST API layer.Barry Warsaw2014-08-121-2/+3
| | | | | Currently, only /<api>/system and its subpaths work, but basic auth does work too. Requires a refactoring modification to falcon.
* Several internal improvements:Barry Warsaw2014-01-061-0/+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-011-1/+1
|
* Fix a couple of intermittent test problems.Barry Warsaw2013-12-011-0/+2
|
* More fixes.Barry Warsaw2013-11-261-0/+4
|
* Bump copyright years.Barry Warsaw2013-01-011-1/+1
|
* * The default list style is renamed to `legacy-default` and a newBarry Warsaw2012-12-301-0/+1
| | | | | | | | `legacy-announce` style is added. This is similar to the `legacy-default` except set up for announce-only lists. Also, major refactoring of the default style into (hopefully) smaller composable units.
* * Deleting a user through the REST API also deletes all the user's linkedBarry Warsaw2012-11-051-1/+0
| | | | | | addresses and memberships. (LP: #1074374) Also: Clean up pyflakes warning by removing an obsolete __all__ entry.
* * Python 2.7 is not required. Python 2.6 is no longer officially supported.Barry Warsaw2012-10-311-20/+4
| | | | | The code base is now also `python2.7 -3` clean, although there are still some warnings in 3rd party dependencies. LP: #1073506
* trunk mergeBarry Warsaw2012-07-061-19/+27
|\
| * More consistency in the way post-configuration changes are processed. LessBarry Warsaw2012-07-021-2/+2
| | | | | | | | | | | | | | | | | | | | magic in the _post_process() method, more ConfigurationUpdatedEvents. More centralization of event initialization. Added property Configuration.language_configs. Instead of initializing events in initialize_2(), initialize them in initialize_1() and do it before the configuration is loaded.
| * * `passlib`_ is now used for all password hashing instead of flufl.password.Barry Warsaw2012-07-021-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The default hash is `sha512_crypt`. * Events renamed and moved: * `mailman.chains.accept.AcceptNotification` * `mailman.chains.base.ChainNotification` * `mailman.chains.discard.DiscardNotification` * `mailman.chains.hold.HoldNotification` * `mailman.chains.owner.OwnerNotification` * `mailman.chains.reject.RejectNotification` changed to (respectively): * `mailman.interfaces.chains.AcceptEvent` * `mailman.interfaces.chains.ChainEvent` * `mailman.interfaces.chains.DiscardEvent` * `mailman.interfaces.chains.HoldEvent` * `mailman.interfaces.chains.AcceptOwnerEvent` * `mailman.interfaces.chains.RejectEvent` * A `ConfigurationUpdatedEvent` is triggered when the system-wide global configuration stack is pushed or popped. * With the switch to `passlib`_, `[passwords]password_scheme` has been removed. Instead use `[passwords]path` to specify where to find the `passlib.cfg` file. See the comments in `schema.cfg` for details.
| * - Modernize the helpers.py module by using print() functions.Barry Warsaw2012-04-221-16/+18
| | | | | | | | | | - Rewrite soem of the code to use the new transaction context manager, instead of explicitly accessing the config.db global.
* | - Refactor the way databases are schema-migrated so that load_migrations()Barry Warsaw2012-04-081-0/+30
|/ | | | | | | | | | | | | | | can be tested separately. - Add an `until` argument to load_migrations() so that we can load only up to a given timestamp. - In load_migrations(), ignore files in which the `version` part of the file name is empty. - In migrations.rst, use the new, better way of ensuring post-test cleanup. - Add tests for partial upgrades. - LP: #971013 - schema migrations for beta 2. - LP: #967238 - IMailingList.archive + IMailingList.archive_private -> IMailingList.archive_policy, and add ArchivePolicy enum. - Move the `chdir` context manager to helpers.py and add `temporary_db` context manager.
* * Header check specifications in the `mailman.cfg` file have changed quiteBarry Warsaw2012-04-061-0/+2
| | | | | | | | | | | | | | | | | | | | bit. The previous `[spam.header.foo]` sections have been removed. Instead, there's a new `[antispam]` section that contains a `header_checks` variable. This variable takes multiple lines of `Header: regexp` values, one per line. There is also a new `jump_chain` variable which names the chain to jump to should any of the header checks (including the list-specific, and programmatically added ones) match. * Fixed a typo when returning the configuration file's header match checks. (LP: #953497) Also: - Remove an unused method. - Improve test coverage for mailman/app/bounces.py - 100% test coverage for mailman/chains/headers.py - Various other minor code cleanup. - Fixed the 'any' rule, which was checking a bogus metadata dictionary key.
* - Improve the NNTP doctest.Barry Warsaw2012-04-021-0/+20
| | | | | - Add a `cleanups` global to doctests. This can be used to register functions which will get called automatically at doctest tearDown time.