summaryrefslogtreecommitdiff
path: root/src/mailman/tests/test_documentation.py
Commit message (Collapse)AuthorAgeFilesLines
* * 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-011-1/+1
|
* * 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.
* - 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.
* copybumpBarry Warsaw2012-01-011-1/+1
|
* Remove extraneous `test_suite()` functions. zope.testrunner willBarry Warsaw2011-10-301-0/+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.
* * 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.
* 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-011-1/+1
|
* 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.
* 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
|
* Fixes bug LP: #601899; delete list function in rest server.Barry Warsaw2010-07-061-1/+0
|
* cleanupBarry Warsaw2010-05-251-2/+0
|
* Complete the conversion to restish. All the tests pass and we're now actuallyBarry Warsaw2010-02-241-17/+25
| | | | | | RESTful. We have to use httplib2 to get DELETE and PUT. This is a prototype and could still use much cleanup.
* Happy New Year.Barry Warsaw2010-01-011-1/+1
|
* Expose 'transaction' as an alias for config.db in the doctest globs. ThisBarry Warsaw2009-07-211-1/+1
| | | | | | | | means commit() is now transaction.commit() in doctests. Add tests of extended domain creation, which exposes the need to unlock the database (via transaction.abort()) so that the foreground test process doesn't lock the background REST server process.
* Our first writable REST API! You can now create new domains through theBarry Warsaw2009-07-201-3/+16
| | | | | | | | | webserver. Fix the https/http urls. Add the adapter for HTTPCharsets so POSTs work properly. Nice little cargo cult from lazr.restful.
* De-u-literal-ify our doctests.Barry Warsaw2009-07-181-1/+4
|
* De-u-literal-ify our doctests.Barry Warsaw2009-07-171-0/+4
|
* Wow. Put domains into the database.Barry Warsaw2009-07-161-3/+5
| | | | | | | | Add an IDomainManager and a global domain manager which can be gotten by adapting the global config object. Add an IDomainCollection interface for exposing the domain manager onto the API.
* Add an adapter for IDomain to IAbsoluteURL and add some zope.security onionsBarry Warsaw2009-06-291-1/+8
| | | | to the varnish.
* Allow for setting the doctest layer in the doctest package's __init__. If notBarry Warsaw2009-05-271-5/+15
| | | | given, then SMTPLayer is used by default.
* A working test of the REST server. http://localhost:8001/3.0/sys returnsBarry Warsaw2009-05-041-0/+19
| | | | useful information. It's GET only atm.
* Move mailman.Message to mailman.email.Message. Rename Message.get_sender() toBarry Warsaw2009-02-091-1/+1
| | | | | | | | | Message.sender (property) and Message.get_senders() to Message.senders (another property). The semantics of .sender is slightly different too; it no longer consults config.mailman.use_envelope_sender. Add absolute_import and unicode_literals to Utils.py, and clean up a few imports.
* Massive digester rework.Barry Warsaw2009-02-041-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This moves actual digest creation and sending into a new queue runner. That way, digest creation does not block the main incoming processor. Lots of code clean up and reorganization too, and many fixes. digest_last_sent_at: Make this a DateTime digest_size_threshold: Make this a Float digest_volume_frequency: Make this an Enum DigestFrequency: new enum Fix up IMailingList interface to reflect reality. In Runner base class, allow for msg.get_sender() to return a False value. If this happens (as it can with the empty marker messages used to signal the digester that there's work to do), just use the list's preferred language. Give the retry.py and incoming.py queue runner modules some proper epilogues. The EmptyingRunner (for testing) logs itself as the runner its wrapping. The digest file name now ends in .mmdf since that's the format we're using. Add 'create_list' to doctest globals. Add a Mailbox class to add support for the context manager protocol.
* Push the source directory into a 'src' subdirectory so that zc.buildout worksBarry Warsaw2009-01-251-0/+150
correctly regardless of how it's used.