2016-04-10 01:17:34 +08:00
|
|
|
from django import forms
|
|
|
|
|
|
|
|
|
2017-01-19 15:39:46 +08:00
|
|
|
class FormFieldAssertionsMixin:
|
2016-04-10 01:17:34 +08:00
|
|
|
|
|
|
|
def assertWidgetRendersTo(self, field, to):
|
|
|
|
class Form(forms.Form):
|
|
|
|
f = field
|
|
|
|
self.assertHTMLEqual(str(Form()['f']), to)
|