SimpleTestCase.assertFieldOutput(fieldclass, valid, invalid, field_args=None, field_kwargs=None, empty_value='')
[source]
Asserts that a form field behaves correctly with various inputs.
Parameters: |
|
---|
For example, the following code tests that an EmailField
accepts a@a.com
as a valid email address, but rejects aaa
with a reasonable error message:
self.assertFieldOutput(EmailField, {'a@a.com': 'a@a.com'}, {'aaa': ['Enter a valid email address.']})
Please login to continue.