Tests

Director Tests

Test for director

class test_director.ActionRunnerTests(methodName='runTest')

Tests to verify base ActionRunner class works as expected.

setUp()
Sets up stuff for the test.
test_parse_options()
Make sure the parsing of options works.
test_run_code()
Verify generated code runs.
test_run_execption_without_filter()
Verify generated raises an exception if there are no filters during run.
test_run_with_filter()
Verify generated code runs with filter.
test_run_without_filter()
Verify generated code runs without filter.
class test_director.ActionTests(methodName='runTest')

Tests to verify that base action class works correctly.

setUp()
Sets up stuff for the test.
tearDown()
Tears down stuff for config test.
test__action_help()
Tests the _action_help works.
test__list_verbs()
Tests the _list_verbs method.
test_description()
Tests the description works.
test_help()
Tests the help works.

Director Filter Tests

Tests for filter.

class test_filter.ExceptionFilterTests(methodName='runTest')

Tests the code for ExceptionFilters.

setUp()
Sets up stuff for the test.
tearDown()
Tears down after each test.
test_filter()
Tests the filter functionality.
class test_filter.FilterTests(methodName='runTest')

Tests the Filter object.

setUp()
Sets up stuff for the test.
tearDown()
Tears down after each test.
test_execute_filters()
Tests the execute_filters method.
test_register_filter()
Tests the register_filter method.

Director Test Help Code

Test action to use in unit tests.

class actions.simpleaction.Simpleaction

Very simple action for use in testing.

verb(*args, **kwargs)

Internal wrapper that actually executes the method.

Parameters:
  • self: the class methods container object.
  • *args: any non keyword arguments.
  • **kwargs: all keyword arguments.