### Navigation

- index
- modules |
- next |
- previous |
- Postorius 1.0a2 documentation »

# Writing tests

## Mocking mailman.client objects

### Mailing Lists

    >>> from postorius.tests.utils import *

    >>> properties = dict(fqdn_listname='testlist@example.org',
    ...                   mail_host='example.org',
    ...                   list_name='testlist',
    ...                   display_name='Test List')
    >>> mock_list = create_mock_list(properties)
    >>> print mock_list.fqdn_listname
    testlist@example.org
    >>> print mock_list.mail_host
    example.org
    >>> print mock_list.list_name
    testlist
    >>> print mock_list.display_name
    Test List
    >>> print mock_list
    <MagicMock name='List' id='...'>

### Navigation

- index
- modules |
- next |
- previous |
- Postorius 1.0a2 documentation »