Module TestsΒΆ

Every modules must have a tests suite to detect when there are changes on websites, or when a commit breaks the behavior of the module.

Edit and write, for example:

# -*- coding: utf-8 -*-
from import BackendTest

__all__ = ['ExampleTest']

class ExampleTest(BackendTest):
    MODULE = 'example'

    def test_iter_accounts(self):
        accounts = list(self.backend.iter_accounts())

        self.assertTrue(len(accounts) > 0)

To try running test of your module, launch:

$ tools/ example

For more information, look at the Automated tests guides.