summaryrefslogtreecommitdiff
path: root/src/mailman/testing
Commit message (Collapse)AuthorAgeFilesLines
* Add REST-ability to plugins.J08nY2017-08-071-2/+67
| | | | | | | | | | | | | | | | | | | | - Adds the rest_object method to the IPlugin interface. This method is called by the REST api to route requests to the plugin's REST api. All attributes are proxied, so the object becomes a true REST object in the ObjectRouter hierarchy. For example see the RESTExample and ExamplePlugin classes in mailman.testing.plugin. The plugin might return None from this method, in which case all calls to it's REST api route will return 404 NotFound. - Adds new routes to the REST api. For version >= 3.1: - /3.1/plugins Returns a dictionary with plugin names as keys, and their configs as values. - /3.1/plugins/<plugin_name> Proxies everything to plugin's rest_object, if plugin with such name exists and provides a non-null rest_object, else NotFound.
* Pretty print dicts in dump_json.J08nY2017-08-071-0/+10
| | | | | | | | | | | - Makes dump_json documentation helper recursively print dicts with indentation. So for example {'name': {'a':1, 'b':2}, 'other': test} becomes: name: a: 1 b: 2 other: test
* Add per-plugin hooks, add docs about plugins.J08nY2017-08-072-0/+40
| | | | | | | | | | | | | | | - Removes pre_hook, post_hook and ext_dir. With the latter being unused. Warns on startup if the hooks are present in config. - Adds IPlugin interface with pre_hook and post_hook methods. - Adds 'class' config parameter to plugins, which can be set to a class implementing the IPlugin interface, it will be initialized once on Mailman's startup, then before the DB setup the pre_hook will be run, after DB and other components the post_hook will be run. Plugin instances are stored in the config.plugins dict, with keys being their configuration section names.
* Convert to click for CLI optionsBarry Warsaw2017-07-222-2/+30
|
* Add support for regex based postfix transport maps and relay_domains.Abhilash Raj2017-05-231-0/+1
|
* Port to aiosmtpd 1.0a5Barry Warsaw2017-04-061-14/+11
|
* Remove the dependency on httplib2.Barry Warsaw2017-02-062-26/+21
| | | | Closes #42
* Bump copyright years.Barry Warsaw2017-01-047-7/+7
|
* Implement caching suffix list with in-tree fallback.Barry Warsaw2017-01-012-8/+9
| | | | | | | | 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.
* More fixes & flufl.testing.Barry Warsaw2016-11-291-118/+0
|
* Use flufl.testing's flake8 plugin.Barry Warsaw2016-11-291-141/+0
|
* Use `atpublic` for @public instead of internal copy.Barry Warsaw2016-11-296-6/+6
|
* Merge branch 'hide-system-disabled-archivers' into 'master' Barry Warsaw2016-11-261-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | Don't show the disabled archivers in the REST API Previously, system-disabled archivers were shown in the REST API. As a result it was possible to enable them without a validation error, but they would stay disabled on the next API GET call (their actual activation status depends on the list-specific *and* the system-wide status). Because one can't add a configuration overlay to the running REST server in testing mode, the prototype archiver was disabled in the testing configuration. This is where most of the changes in this commit come from. See merge request !87
| * Don't show the disabled archivers in the REST APIAurélien Bompard2016-08-181-1/+1
| | | | | | | | | | | | | | Because one can't add a configuration overlay to the running REST server in testing mode, the prototype archiver was disabled in the testing configuration. This is where most of the changes in this commit come from.
* | Use aiosmtpd 1.0a3 and add NEWS.Barry Warsaw2016-11-241-41/+9
| |
* | Remove some unused code.Barry Warsaw2016-11-241-12/+0
| |
* | Remove some unnecessary code and update a comment.Barry Warsaw2016-11-241-4/+0
| |
* | Fix the connection count tests.Barry Warsaw2016-11-241-8/+37
| |
* | Mostly converted to aiosmtpd.Barry Warsaw2016-11-241-127/+118
| | | | | | | | | | Rewrite the smtpd based servers using aiosmtpd, although it still needs a bit of work. Requires aiosmtpd 1.0a3 which is not yet released.
* | Start converting lazr.smtptestBarry Warsaw2016-11-241-0/+1
| |
* | Fix the Flake8 ignore tagsAurélien Bompard2016-11-212-2/+2
| |
* | 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-282-2/+2
|
* New template system. Closes #249Barry Warsaw2016-07-165-28/+22
| | | | | The new template system is introduced for API 3.1. See ``src/mailman/rest/docs/templates.rst`` for details.
* Replace another rmtree() with a better solution.Barry Warsaw2016-05-011-4/+8
|
* Use contextlib.suppress() where appropriate.Barry Warsaw2016-04-301-7/+4
|
* Ensure that $(PWD)/var/ is cleaned up.Barry Warsaw2016-04-301-1/+5
|
* Fix mailman shell processing of $PYTHONSTARTUP.Barry Warsaw2016-04-081-0/+20
| | | | Closes #224
* Don't use `flake8: noqa`.Barry Warsaw2016-04-012-2/+2
| | | | | | | 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.
* Refactor.Barry Warsaw2016-03-291-31/+31
|
* Tweak the import rules checker.Barry Warsaw2016-03-271-1/+16
| | | | Fix the last few violations of the import rules.
* Import order flake8 plugin.Barry Warsaw2016-03-271-3/+85
| | | | Fix lots of import order errors discovered by the new plugin.
* Start of import order testing.Barry Warsaw2016-03-271-0/+44
|
* Clean up the testing directory.Barry Warsaw2016-03-256-99/+47
|
* Clean up the interfaces directory.Barry Warsaw2016-03-251-1/+2
|
* 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-112-4/+2
| | | | | | | | | | | | * 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-028-8/+8
|
* Major push for completing issue #121. Now in API 3.1, all UUIDs must be theBarry Warsaw2015-12-301-4/+4
| | | | | | | | | hex representations of a UUID, not the int representation. Also: * Some general code cleanup. * Fix issue 185 (REST server crash when subscribing a user without a preferred address).
* Coverage improvements.Barry Warsaw2015-12-291-1/+1
| | | | | | | | * Boost coverage. * Don't report coverage on the test modules. * In one test, when acquiring the lock, set a timeout. Hopefully this will eliminate the occasional test deadlock. * Fix a buglet in wrap()
* * Remove the test_suite key from setup.py; it isn't the right way to run theBarry Warsaw2015-10-081-2/+2
| | | | | tests suite (for that, use tox). * Use resource_filename() to locate the top mailman package.
* Core no longer depends on the standalone `mock` module. (Closes: #146)Barry Warsaw2015-09-221-1/+1
|
* Turn off tying the -E test suite option to debugging the database logger.Barry Warsaw2015-08-181-2/+5
| | | | | | | SQLAlchemy is generally pretty chatty and usually not necessary to debug. Set use_poll=True in asyncore.loop() which improves Python 3.5 compatibility. We were getting OSErrors in stop() when using select under Python 3.5.
* Port to Python 3.5.Barry Warsaw2015-06-221-4/+37
|
* Abhilash's branch, pre-cleaning.Barry Warsaw2015-04-061-1/+1
|\
| * merge serverowner branchAbhilash Raj2015-03-271-1/+1
| |\
| | * all tests passing now (except doctests)Abhilash Raj2015-03-261-1/+1
| | |