Remove an extra MockHTMLDict definition.

This commit is contained in:
Xavier Ordoquy 2015-06-01 15:46:27 +01:00
parent a0f66ffc69
commit 2f524ec1a3

View File

@ -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):