mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-01-23 15:54:16 +03:00
Merge pull request #2992 from linovia/feature/clean_mock_html_dir
Remove an extra MockHTMLDict definition.
This commit is contained in:
commit
0fdaa0dbba
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue
Block a user