Merge pull request #2992 from linovia/feature/clean_mock_html_dir

Remove an extra MockHTMLDict definition.
This commit is contained in:
Tom Christie 2015-06-01 15:54:09 +01:00
commit 0fdaa0dbba

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