Skip to content

Instantly share code, notes, and snippets.

View mkemmerling's full-sized avatar

Markus Kemmerling mkemmerling

  • Medical University Vienna
  • Vienna/Austria
View GitHub Profile
from django.http import QueryDict
from rest_framework import serializers
class TestAllowBlank:
def test_query_dict_without_default(self):
"""
For a non-required CharField that allows blanks an empty string
is omitted from the validated serializer data if passed as