dry_tests package

Subpackages

Submodules

dry_tests.apps module

DRY Tests django app

class dry_tests.apps.DryTestsConfig(app_name, app_module)[source]

Bases: AppConfig

Dry Tests App Config Class

default_auto_field = 'django.db.models.BigAutoField'
name = 'dry_tests'

dry_tests.testcases module

Base testcases

class dry_tests.testcases.SimpleTestCase(methodName='runTest')[source]

Bases: TestCaseMixin, SimpleTestCase

SimpleTestCase without test database

class dry_tests.testcases.TestCase(methodName='runTest')[source]

Bases: TestCaseMixin, TestCase

TestCase with test database

class dry_tests.testcases.TestCaseMixin[source]

Bases: object

Main TestCase without test database

assertContentValues(current_response, true_response)[source]

Check Content Value :param request: Request :param response: Response :return: None

assertContextItems(current_response, true_response)[source]

Check Context Value :param current_response: HttpResponse :param true_response: TrueResponse :return: None

assertContextTypes(current_response, true_response)[source]

Check context values types :param current_response: HttpResponse :param true_response: TrueResponse :return:

assertFieldsInForm(current_form, true_form)[source]

Check fields in form :param current_form: :param true_form: :return:

assertFormFieldsCount(current_form, true_form)[source]

Check fields count :param current_form: :param true_form: :return:

assertFormTypes(current_form, true_form)[source]

Check form fields types :param current_form: :param true_form: :return:

assertKeysInContext(current_response, true_response)[source]

Check Value In Context :param request: Request :param response: Response :return: None

assertRedirectUrl(current_response, true_response)[source]

Check Redirect Url :param request: Request :param response: Response :return: None

assertResponsesAreTrue(response_pairs)[source]

Check all response pairs :param response_pairs: :return:

assertStatusCode(current_response, true_response)[source]

Check status code :param request: Request :param response: Response :return: None

assertTrueForm(current_form, true_form)[source]

Main assert for Forms :param current_form: django form :param true_form: TrueForm :return: None

assertTrueResponse(current_response, true_response)[source]

Main assert for request and response Check all parameters sent in response :param request: Request :param response: Response :return: None

assertValuesInContext(current_response, true_response)[source]

Check Value In Context :param request: Request :param response: Response :return: None

Module contents

Init file for dry_test package