mirror of
https://github.com/django/django.git
synced 2025-11-07 07:15:35 +00:00
Converted Swedish localflavor tests from doctests to unittests. Thanks, Idan Gazit!
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15057 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -14,8 +14,9 @@ class LocalFlavorTestCase(TestCase):
|
||||
restore_warnings_state(self._warnings_state)
|
||||
|
||||
def assertFieldOutput(self, fieldclass, valid, invalid, field_args=[],
|
||||
field_kwargs={}, empty_value=u''):
|
||||
"""Asserts that a field behaves correctly with various inputs.
|
||||
field_kwargs={}, empty_value=u''):
|
||||
"""
|
||||
Asserts that a field behaves correctly with various inputs.
|
||||
|
||||
Args:
|
||||
fieldclass: the class of the field to be tested.
|
||||
@@ -23,9 +24,10 @@ class LocalFlavorTestCase(TestCase):
|
||||
cleaned values.
|
||||
invalid: a dictionary mapping invalid inputs to one or more
|
||||
raised error messages.
|
||||
fieldargs: the args passed to instantiate the field
|
||||
fieldkwargs: the kwargs passed to instantiate the field
|
||||
emptyvalue: the expected clean output for inputs in EMPTY_VALUES
|
||||
field_args: the args passed to instantiate the field
|
||||
field_kwargs: the kwargs passed to instantiate the field
|
||||
empty_value: the expected clean output for inputs in EMPTY_VALUES
|
||||
|
||||
"""
|
||||
required = fieldclass(*field_args, **field_kwargs)
|
||||
optional = fieldclass(*field_args, **dict(field_kwargs, required=False))
|
||||
|
||||
Reference in New Issue
Block a user