Skip to content

Commit 0fdaa0d

Browse files
committed
Merge pull request #2992 from linovia/feature/clean_mock_html_dir
Remove an extra MockHTMLDict definition.
2 parents e3f856f + 2f524ec commit 0fdaa0d

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

tests/test_fields.py

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff 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+
224232
class 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-
252250
class TestHTMLInput:
253251
def test_empty_html_charfield(self):
254252
class TestSerializer(serializers.Serializer):

0 commit comments

Comments
 (0)