Commit 19f2bcb4 authored by Abhilash Raj's avatar Abhilash Raj

Update developer documentation to add testing instructions.

parent 5e1c5192
......@@ -27,20 +27,18 @@ postfix (a mail server), and a few other tools that are used during setup.
On Fedora, you probably want to run::
$ sudo yum install python-setuptools python-virtualenv python3-devel git gcc nodejs-less postfix
$ sudo yum install python3-setuptools python3-virtualenv python3-devel git gcc nodejs-less postfix python3-tox
On Debian and Ubuntu, this may be something like::
$ sudo apt-get install python-setuptools python-virtualenv python3-dev git gcc node-less nodejs postfix
$ sudo apt-get install python3-setuptools python3-virtualenv python3-dev git gcc node-less nodejs postfix python3-tox
If you prefer, you can substitute Exim4 for Postfix. Postfix is the MTA used
by most Mailman developers, but we do support Exim 4. (`Sendmail support is
very much desired`_, but the Mailman core developers need contributors with
Sendmail expertise to help.)
You will need tox to run tests. You can get this using `pip install tox`.
HyperKitty also needs sassc.
You will need `tox <>`_ to run tests. HyperKitty also needs sassc.
**FIXME:** Add instructions on how to get sassc on a few platforms.
......@@ -154,6 +152,15 @@ that is particularly useful for debugging is ``mailman shell``.
$ pip install ipython
You can run tests for Mailman Core (or any Mailman project) using `tox <>`
$ tox -e py37-nocov
This requires that you have Python3.7 installed. You change it to ``py36-nocov`` and ``py35-nocov`` to run
tests with Python 3.6 and 3.5 respectively.
Set up Mailman Client
......@@ -168,6 +175,10 @@ Then set up mailmanclient::
$ python develop
$ cd ..
To run the tests::
$ tox -e py37
Set up Django-mailman3
......@@ -182,6 +193,10 @@ Get the code and set it up::
$ python develop
$ cd ..
To run the tests::
$ tox -e py37-django21
Set up and run Postorius
......@@ -204,9 +219,13 @@ Postorius and HyperKitty both come with ``example_project`` directories with
basic configuration so you can try them out. For this tutorial, however,
we'll be using a project that combines both instead.
You can run tests using::
$ tox -e py37-django21
Set up a mail server
Set up a Fake mail server
To be able to actually receive emails, you need to setup a mail server. Mailman
core receives emails over LMTP Protocol, which most of the modern MTAs
......@@ -235,7 +254,12 @@ Also, in Django you can add the following configuration to your
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
This writes everything to ``stdout``.
This writes everything to ``stdout``. There are `other email backends <>`_
available to use for testing like
``django.core.mail.backends.filebased.EmailBackend`` that one can use
to write outgoing emails to a file on disk. Please see the docs for
other options.
Set up and run HyperKitty
......@@ -260,6 +284,10 @@ basic configuration so you can try them out. By default, they both use port
remember that you'll need to specify a different port on the command line for
one of them.
You can run tests using::
$ tox -e py37-django21
However, we're going to run them both in a single Django instance at the end
of this guide, so don't worry about ports right now.
......@@ -283,6 +311,9 @@ You'll need to fix the default ``mailman-hyperkitty.cfg`` file to use the
correct url for HyperKitty. If you're running it on http://localhost:8002
then you need to change ``base_url`` to match that.
You can run tests using::
$ tox -e py37-coverage
Link Mailman to HyperKitty
......@@ -335,7 +366,9 @@
Using this backend, all emails will be printed to the Postorius console
(rather than sent as email) so you can get the url to verify your email from
the console.
the console. You can also use
`FileBackend <>`
to write emails to a file on disk.
Don't leave the console email backend configured and running once you get to
the point where you want to send real emails, though!
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment