aspen.testing

This module provides helpers for testing applications that use Aspen.

aspen.testing.teardown()

Standard teardown function.

  • reset the current working directory
  • remove FSFIX = %{tempdir}/fsfix
  • reset Aspen’s global state
  • clear out sys.path_importer_cache
class aspen.testing.Harness

A harness to be used in the Aspen test suite itself. Probably not useful to you.

simple(contents=u'Greetings, program!', filepath=u'index.html.spt', uripath=None, querystring=u'', request_processor_configuration=None, **kw)

A helper to create a file and hit it through our machinery.