MCPcopy Index your code
hub / github.com/encode/django-rest-framework / test_allow_unicode_true

Method test_allow_unicode_true

tests/test_fields.py:922–931  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

920 field = serializers.SlugField()
921
922 def test_allow_unicode_true(self):
923 field = serializers.SlugField(allow_unicode=True)
924
925 validation_error = False
926 try:
927 field.run_validation('slug-99-\u0420')
928 except serializers.ValidationError:
929 validation_error = True
930
931 assert not validation_error
932
933
934class TestURLField(FieldValues):

Callers

nothing calls this directly

Calls 1

run_validationMethod · 0.45

Tested by

no test coverage detected