Available tests

TestEmailTypeMixin

class thecut.forms.tests.test_forms.TestEmailTypeMixin(methodName='runTest')

Tests for the thecut.forms.forms.EmailTypeMixin class.

test_input_type_not_set_to_email_for_non_emailfield()

Test that the HTML input attribute is not set to email on a child django.forms.Field that is not django.forms.EmailField.

test_input_type_set_to_email_for_emailfield()

Test that the HTML input attribute is set to email on a child django.forms.EmailField.

TestRequiredMixin

class thecut.forms.tests.test_forms.TestRequiredMixin(methodName='runTest')

Tests for the thecut.forms.forms.RequiredMixin class.

test_required_attribute_not_set_for_optional_field()

Test that the HTML5 required attribute is not set on a child django.forms.Field that does not have required set to True.

test_required_attribute_not_set_for_required_checkbox_widget()

Test that the HTML5 required attribute is not set on a child django.forms.Field that has required set to True and uses the django.forms.CheckboxSelectMultiple widget.

test_required_attribute_not_set_for_required_radio_widget()

Test that the HTML5 required attribute is not set on a child django.forms.Field that has required set to True and uses the django.forms.RadioSelect widget.

test_required_attribute_set_for_required_field()

Test that the HTML5 required attribute is set on a child django.forms.Field that has required set to True.

TestMaxLengthMixin

class thecut.forms.tests.test_forms.TestMaxLengthMixin(methodName='runTest')

Tests for the thecut.forms.forms.MaxLengthMixin class.

test_correct_maxlength_set_for_textarea_with_max_length()

Test if the correct HTML5 maxlength attribute is set on a child django.forms.Field using django.forms.Textarea`and with ``max_length` set.

test_no_maxlength_for_non_textarea_with_max_length()

Test if no HTML5 maxlength attribute is set on a child django.forms.Field not using django.forms.Textarea but with max_length set.

test_no_maxlength_for_non_textarea_with_no_max_length()

Test if no HTML5 maxlength attribute is set on a child django.forms.Field not using django.forms.Textarea and with no max_length set.

test_no_maxlength_for_textarea_with_no_max_length()

Test if no HTML5 maxlength attribute is set on a child django.forms.Field using django.forms.Textarea and with no max_length set.

TestPlaceholderMixin

class thecut.forms.tests.test_forms.TestPlaceholderMixin(methodName='runTest')

Tests for the thecut.forms.forms.PlaceholderMixin class.

test_placeholder_not_set_when_not_defiend()

Test if the correct HTML5 placeholder attribute is not set on a py:class:django.forms.Field when no appropriate entry is added to the placeholders dict.

test_placeholder_set_when_defiend()

Test if the correct HTML5 placeholder attribute is set on a field when an appropriate entry is added to the placeholders dict.

TestTimeClassMixin

class thecut.forms.tests.test_forms.TestTimeClassMixin(methodName='runTest')

Tests for the thecut.forms.forms.TimeClassMixin class.

test_time_class_added_for_timefield()

Test if the time CSS class is applied to a child py:class:django.forms.Field using the django.forms.TimeInput widget.

test_time_class_not_added_for_nontimefield()

Test if the time CSS class is not applied to a child py:class:django.forms.Field not using the django.forms.TimeInput widget.

TestDateClassMixin

class thecut.forms.tests.test_forms.TestDateClassMixin(methodName='runTest')

Tests for the thecut.forms.forms.DateClassMixin class.

test_date_class_added_for_datefield()

Test if the date CSS class is applied to a child py:class:django.forms.Field using the django.forms.DateInput widget.

test_date_class_not_added_for_nondatefield()

Test if the date CSS class is not applied to a child py:class:django.forms.Field not using the django.forms.DateInput widget.

TestFormMixin

class thecut.forms.tests.test_forms.TestFormMixin(methodName='runTest')

Tests for the thecut.forms.forms.EmailTypeMixin class.