MCPcopy
hub / github.com/encode/django-rest-framework / test_default

Method test_default

tests/test_fields.py:185–191  ·  view source on GitHub ↗

If `default` is set, then omitted values get the default input.

(self)

Source from the content-addressed store, hash-verified

183 assert output == ''
184
185 def test_default(self):
186 """
187 If `default` is set, then omitted values get the default input.
188 """
189 field = serializers.IntegerField(default=123)
190 output = field.run_validation()
191 assert output == 123
192
193
194class TestSource:

Callers

nothing calls this directly

Calls 1

run_validationMethod · 0.45

Tested by

no test coverage detected