File tree Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -221,6 +221,14 @@ def test_invalid_error_key(self):
221221 assert str (exc_info .value ) == expected
222222
223223
224+ class MockHTMLDict (dict ):
225+ """
226+ This class mocks up a dictionary like object, that behaves
227+ as if it was returned for multipart or urlencoded data.
228+ """
229+ getlist = None
230+
231+
224232class TestBooleanHTMLInput :
225233 def setup (self ):
226234 class TestSerializer (serializers .Serializer ):
@@ -234,21 +242,11 @@ def test_empty_html_checkbox(self):
234242 """
235243 # This class mocks up a dictionary like object, that behaves
236244 # as if it was returned for multipart or urlencoded data.
237- class MockHTMLDict (dict ):
238- getlist = None
239245 serializer = self .Serializer (data = MockHTMLDict ())
240246 assert serializer .is_valid ()
241247 assert serializer .validated_data == {'archived' : False }
242248
243249
244- class MockHTMLDict (dict ):
245- """
246- This class mocks up a dictionary like object, that behaves
247- as if it was returned for multipart or urlencoded data.
248- """
249- getlist = None
250-
251-
252250class TestHTMLInput :
253251 def test_empty_html_charfield (self ):
254252 class TestSerializer (serializers .Serializer ):
You can’t perform that action at this time.
0 commit comments