This module provides helpers for testing applications that use Aspen.


Standard teardown function.

  • reset the current working directory
  • remove FSFIX = %{tempdir}/fsfix
  • 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='Greetings, program!', filepath='index.html.spt', uripath=None, querystring='', request_processor_configuration=None, **kw)

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


A context manager that temporarily changes the working directory.