django/tests/forms_tests/field_tests/__init__.py

10 lines
213 B
Python

from django import forms
class FormFieldAssertionsMixin:
def assertWidgetRendersTo(self, field, to):
class Form(forms.Form):
f = field
self.assertHTMLEqual(str(Form()['f']), to)