aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/tests
diff options
context:
space:
mode:
authorTom Christie2013-01-18 23:36:35 +0000
committerTom Christie2013-01-18 23:36:35 +0000
commit4eb5861f3676781493af29f8e9fd87ec22e591aa (patch)
tree6a9025590cbed848977438205f2af2be7483a910 /rest_framework/tests
parent4b61ead53ff3d13e55346e07317612096f704af8 (diff)
downloaddjango-rest-framework-4eb5861f3676781493af29f8e9fd87ec22e591aa.tar.bz2
Starting migration from ManyField to Field(many=True)
Diffstat (limited to 'rest_framework/tests')
-rw-r--r--rest_framework/tests/serializer.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/rest_framework/tests/serializer.py b/rest_framework/tests/serializer.py
index bd96ba23..b2d62ade 100644
--- a/rest_framework/tests/serializer.py
+++ b/rest_framework/tests/serializer.py
@@ -1,5 +1,6 @@
import datetime
import pickle
+from django.utils.datastructures import MultiValueDict
from django.test import TestCase
from rest_framework import serializers
from rest_framework.tests.models import (HasPositiveIntegerAsChoice, Album, ActionItem, Anchor, BasicModel,
@@ -479,7 +480,8 @@ class ManyToManyTests(TestCase):
containing no items, using a representation that does not support
lists (eg form data).
"""
- data = {'rel': ''}
+ data = MultiValueDict()
+ data.setlist('rel', [''])
serializer = self.serializer_class(data=data)
self.assertEquals(serializer.is_valid(), True)
instance = serializer.save()