mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-25 19:14:01 +03:00
Added failing test case
Adding failing test case when many=false is explicitly defined https://github.com/tomchristie/django-rest-framework/issues/3042
This commit is contained in:
parent
e368986fcf
commit
79736e516a
|
@ -48,6 +48,11 @@ class TestPrimaryKeyRelatedField(APISimpleTestCase):
|
|||
representation = self.field.to_representation(self.instance)
|
||||
assert representation == self.instance.pk
|
||||
|
||||
def test_explicit_many_false(self):
|
||||
field = serializers.PrimaryKeyRelatedField(queryset=self.queryset, many=False)
|
||||
instance = field.to_internal_value(self.instance.pk)
|
||||
assert instance is self.instance
|
||||
|
||||
|
||||
class TestProxiedPrimaryKeyRelatedField(APISimpleTestCase):
|
||||
def setUp(self):
|
||||
|
|
Loading…
Reference in New Issue
Block a user