General Setting Configuration

The following Django settings allow configuration of the ExpandedTestCases package.

All of these settings are optional, and will fall back to a default value if not defined.

DJANGO_EXPANDED_TESTCASES_DEBUG_PRINT

Django ETC can optionally provide additional debug testing output, to help with trying to troubleshoot test errors. See Debug Output Overview for more details.

This setting enables or disables debug output.

Type

bool

Default

True

Example:

DJANGO_EXPANDED_TESTCASES_DEBUG_PRINT = False

DJANGO_EXPANDED_TESTCASES_ALLOW_MESSAGE_PARTIALS

When running the assertContextMessages assertion, this setting can optionally allow partial message matching. If partial is allowed, then checking for message substrings will pass. Otherwise, the message string must match the full provided test value, or it will fail.

Type

bool

Default

True

Example:

DJANGO_EXPANDED_TESTCASES_ALLOW_MESSAGE_PARTIALS = False

DJANGO_EXPANDED_TESTCASES_MATCH_ALL_CONTEXT_MESSAGES

Warning

Not yet implemented.

Planned for a future release.

When running the assertContextMessages assertion, this setting optionally tell tests to fail when there are messages in the response that were not explicitly tested for.

Type

bool

Default

False

Example:

DJANGO_EXPANDED_TESTCASES_MATCH_ALL_CONTEXT_MESSAGES = True

SELENIUM_TEST_BROWSER

When using the LiveServerTestCase classes for Selenium tests, this setting specifies which browser to use.

Currently, supported test browsers are as follows:
  • chrome

  • chromium

  • firefox

Type

string

Default

chrome

Example:

SELENIUM_TEST_BROWSER = 'firefox'