summaryrefslogtreecommitdiff
path: root/src/mailman/tests
Commit message (Collapse)AuthorAgeFilesLines
* Bump copyright years.Barry Warsaw2017-01-041-1/+1
|
* Fix the Flake8 ignore tagsAurélien Bompard2016-11-211-1/+1
|
* Rebase mailman/mailman!180 and cleanup # noqaBarry Warsaw2016-07-281-1/+1
|
* Fix mailman shell processing of $PYTHONSTARTUP.Barry Warsaw2016-04-081-14/+1
| | | | 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 utilities directory.Barry Warsaw2016-03-251-12/+1
|
* Happy New Year.Barry Warsaw2016-01-021-1/+1
|
* Bump copyright years.Barry Warsaw2015-01-041-1/+1
|
* Remove huge amounts of now unnecessary file boilerplate.Barry Warsaw2014-12-221-4/+5
|
* Use print functions consistently through, and update all __future__ imports toBarry Warsaw2014-04-281-7/+7
| | | | | | | | reflect this. Also, mock out sys.stderr on some tests so that their nose2 output is quieter. A few other minor coding style consistencies.
* Bump copyright years.Barry Warsaw2014-01-011-1/+1
|
* * Re-name doctests.Barry Warsaw2013-08-251-233/+0
| | | | | * Fix executable location now that we're not using buildout. * Fix enum repr.
* Bump copyright years.Barry Warsaw2013-01-012-2/+2
|
* * List styles are supported through the REST API. Get the list of availableBarry Warsaw2012-12-301-2/+8
| | | | | | | | | | | styles (by name) via `.../lists/styles`. Create a list in a specific style by using POST data `style_name=<style>`. (LP: #975692) Also: * Rewrite list.rst and some of configuration.rst to be more readable as documentation. Bad-path tests are moved to unittests. * Some improvements to printing lists as part of REST responses. This eliminates the ugly u''-prefixes on strings.
* * Show devmode in `bin/mailman info` output. (LP: #1035028)Barry Warsaw2012-08-171-1/+6
| | | | | | Also, allow doctest cleanups to be tuples, in which case the first item is the callable and the subsequent items are the arguments. Makes for config.pop()'ing much nicer.
* - Refactor the way databases are schema-migrated so that load_migrations()Barry Warsaw2012-04-081-18/+2
| | | | | | | | | | | | | | | 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.
* Remove redundant, obsolete test data. This stuff all lives in flufl.bounceBarry Warsaw2012-04-0687-10367/+0
| | | | now.
* - Improve the NNTP doctest.Barry Warsaw2012-04-021-1/+10
| | | | | - Add a `cleanups` global to doctests. This can be used to register functions which will get called automatically at doctest tearDown time.
* * The `mailman.cfg` configuration file will now automatically be detected ifBarry Warsaw2012-02-271-2/+32
| | | | it exists in an `etc` directory which is a sibling of argv0.
* copybumpBarry Warsaw2012-01-012-2/+2
|
* Remove extraneous `test_suite()` functions. zope.testrunner willBarry Warsaw2011-10-303-414/+4
| | | | | | | | | 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.
* Start the enablement of bounce detection.Barry Warsaw2011-05-011-23/+1
| | | | | | | | | | * Move VERP header extraction to mailman.app.bounces, and ports the implementation to the get_verp() function. * Restore the [mta] verp_regexp value which got lost along the way. * Move mailman.email.utils to mailman.utilities.email and add a test for split_email() * Move specialized_message_from_string() from test_documentation to mailman.testing.helpers.
* Remove the redundant src/mailman/tests/test_bounces.py file and ensure all theBarry Warsaw2011-04-271-227/+0
| | | | other bounce detector pass.
* Checkpointing for refactoring.Barry Warsaw2011-04-271-12/+12
|
* * Move members.txt corner cases to unittests.Barry Warsaw2011-04-201-28/+4
| | | | | | | * 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.
* * Re-organize the interface between buildout.cfg and the zope.testing layerBarry Warsaw2011-04-011-1/+3
| | | | | | | | | | | | | | | | | | | initialization. buildout.cfg is now really simple; it calls one method. That method does all the relevant layer initializations. This better localizes what has to be set up before testing can even begin. * IUsers now have a created_on property which contains the datetime at which the user record was created. * Rework the date and uid factories so that they consult the MockAndMonkeyLayer for the current testing flag. Also, those factories register themselves with the layer so that they'll get automatically reset between tests, without the layer actually having to know about them. * Move the User model object initialization into User.__init__() from the user manager. The User now also adds itself to the store. * Add a 'uid factory' for unique id creation, which is test suite aware.
* Eliminate Utils.get_pattern() and in the process, completely revampBarry Warsaw2011-02-251-1/+1
| | | | | | | | | subscription bans so as not to have to rely on BLOBS or pickles in the database. Also, be sure to include .rst files in both doctests and in the packaged tarballs. With the now awesome reST mode for Emacs, I plan to rename all .txt doctest files to .rst.
* Move passwords module to the utilities subpackage.Barry Warsaw2011-02-252-151/+1
|
* Remove some unused/untested stuff regarding password creation from Utils.py.Barry Warsaw2011-01-041-241/+0
| | | | Also, remove a obsolete test.
* Split member and nonmember moderation.Barry Warsaw2011-01-021-0/+3
| | | | | | | | | | | | | | | | * member-moderation happens at the same place in the built-in chain that the previously named moderation rule happens. nonmember-moderation happens after all the other normal moderation rules. * Handle unsubscribed nonmember posts. Other changes: * Message.senders now filters out Nones and empty strings. * Various test cleanups and simplifications. * More `address` -> `email` fixes. * Give Link class a useful repr. * Fix a potential UnboundLocalError. * Various other small changes.
* Happy New Year.Barry Warsaw2011-01-016-6/+6
|
* Because it was just to damn confusing, rename IAddress.address toBarry Warsaw2011-01-011-1/+1
| | | | | | IAddress.email and IAddress.original_address to IAddress.original_email. From now on we'll use "address" to talk about the IAddress object and "email" to talk about the textual email address.
* * Simplify the membership.txt doctest.Barry Warsaw2010-12-311-0/+13
| | | | | | | * Add test to show that the incoming runner adds all sender addresses to the global user manager. * New doctest helper: dump_list() * Other random cleanups.
* Support Python 2.7. (LP: 667472)Barry Warsaw2010-10-271-5/+7
|
* Add Basic Auth support to the REST API, given by Jimmy Bergman, with styleBarry Warsaw2010-10-111-3/+20
|\ | | | | | | corrections by Barry.
| * Add doctest for connecting using invalid credentials and some documentation ↵root2010-09-291-3/+5
| | | | | | | | regarding the basic auth for the REST server.
* | Fix the obvious errors identified by pyflakes. Skip false positives (mostlyBarry Warsaw2010-10-081-2/+0
|/ | | | | due to _() interpolation) and a few other problems that did not have immediately obvious fixes.
* Refactor the list configuration code via the REST interface, and flesh it outBarry Warsaw2010-08-231-2/+2
| | | | considerably.
* Acceptable aliases as a sub-resource.Barry Warsaw2010-08-101-3/+21
|
* Implement HTTP PUT (good path) for changing a list's configuration.Barry Warsaw2010-08-101-2/+2
|
* trunk mergeBarry Warsaw2010-08-101-1/+0
|\
| * Fixes bug LP: #601899; delete list function in rest server.Barry Warsaw2010-07-061-1/+0
| |
* | Refactor all bounce detectors.Barry Warsaw2010-08-081-28/+28
| |
* | checkpointingBarry Warsaw2010-08-071-2/+1
|/
* trunk mergeBarry Warsaw2010-05-251-2/+0
|\
| * cleanupBarry Warsaw2010-05-251-2/+0
| |
* | Basic importer test.Barry Warsaw2010-05-061-0/+13
|/
* More fixes to the start up procedure. The root cause of the fix is that whenBarry Warsaw2010-03-281-1/+1
| | | | | | | | | | | | | | | | | | var_dir in the config file is a relative path, the bin/master and bin/qrunner subprocesses end up creating another hierarchy under $VAR_DIR. This is because 'bin/mailman start' chdirs to $VAR_DIR before starting master. The fix involves putting the absolute path to $VAR_DIR in the $MAILMAN_VAR_DIR environment variable. If the configuration file reader sees this, it uses the value instead of $var_dir from the configuration file. Another change is to remove qrunner's --subproc/-s option and stick this in the environment as well, using $MAILMAN_UNDER_MASTER_CONTROL. Other fixes here include: * Deciphering the master lock file contents correctly * Reformatting the error message so that it fits in 79 columns when prefixed by argparse error info.
* * Use IP address for localhost instead of name because Postfix only uses DNSBarry Warsaw2010-03-271-0/+8
| | | | | | | | to find LMTP server, and DNS typically does not return a 'localhost' query. LP: 544477 * Ensure that the environment doesn't cause test failures. LP: 543618 * for [paths.dev] layout, put directories inside ./var to reduce current working directory pollution.
* Merge the Pycon 2010 sprint branch replacing lazr.restful with restish as theBarry Warsaw2010-03-031-17/+25
|\ | | | | | | underlying REST framework.