diff --git a/tests/test_fields.py b/tests/test_fields.py index 568e8d5e7..a407f5058 100644 --- a/tests/test_fields.py +++ b/tests/test_fields.py @@ -221,6 +221,14 @@ class TestInvalidErrorKey: assert str(exc_info.value) == expected +class MockHTMLDict(dict): + """ + This class mocks up a dictionary like object, that behaves + as if it was returned for multipart or urlencoded data. + """ + getlist = None + + class TestBooleanHTMLInput: def setup(self): class TestSerializer(serializers.Serializer): @@ -234,21 +242,11 @@ class TestBooleanHTMLInput: """ # This class mocks up a dictionary like object, that behaves # as if it was returned for multipart or urlencoded data. - class MockHTMLDict(dict): - getlist = None serializer = self.Serializer(data=MockHTMLDict()) assert serializer.is_valid() assert serializer.validated_data == {'archived': False} -class MockHTMLDict(dict): - """ - This class mocks up a dictionary like object, that behaves - as if it was returned for multipart or urlencoded data. - """ - getlist = None - - class TestHTMLInput: def test_empty_html_charfield(self): class TestSerializer(serializers.Serializer):