Base Test Cases

The base test cases module contains useful classes that inherit from the unit test standard library and optionally inherit from an arbitrary number of mixins. The purpose of these classes is to provide an integration point for the mixins and to help promote the usage of the Arrange-Act-Assert testing methodology used here at AWeber.

class test_helpers.bases.BaseTest(methodName='runTest')

Base class for the AWeber AAA testing style.

This implements the Arrange-Act-Assert style of unit testing though the names were chosen to match existing convention. New unit tests should use this as a base class and replace the configure() and execute() methods as necessary.

classmethod annihilate()

Clean up after a test.

Unlike tearDownClass(), this method is guaranteed to be called in all cases. It will be called even if configure() fails so do not do anything that depends on it having been successful without checking if it was.

classmethod configure()

Extend to configure your test environment.

classmethod execute()

Override to execute your test action.

maxDiff = 100000
classmethod setUpClass()

Arrange the test and do the action.

If you are extending this method, then you are required to call this implementation as the last thing in your version of this method.

classmethod tearDownClass()