diff options
| author | Tom Christie | 2012-10-08 17:53:18 +0100 | 
|---|---|---|
| committer | Tom Christie | 2012-10-08 17:53:18 +0100 | 
| commit | 65f592866c5cd5103e99ed453543807bcbdaa9da (patch) | |
| tree | 311282a5f372878b225ac183a387db3ba6334042 /rest_framework/tests/views.py | |
| parent | 4a21b3557edb3b901b86d3a888c44f772e33b922 (diff) | |
| download | django-rest-framework-65f592866c5cd5103e99ed453543807bcbdaa9da.tar.bz2 | |
Fix issue where required fields were not being properly validated.  Also make model fields with a default value be not required
Diffstat (limited to 'rest_framework/tests/views.py')
| -rw-r--r-- | rest_framework/tests/views.py | 4 | 
1 files changed, 3 insertions, 1 deletions
| diff --git a/rest_framework/tests/views.py b/rest_framework/tests/views.py index 61b288c6..3746d7c8 100644 --- a/rest_framework/tests/views.py +++ b/rest_framework/tests/views.py @@ -17,12 +17,14 @@ class BasicView(APIView):          return Response({'method': 'POST', 'data': request.DATA}) -@api_view(['GET', 'POST']) +@api_view(['GET', 'POST', 'PUT'])  def basic_view(request):      if request.method == 'GET':          return {'method': 'GET'}      elif request.method == 'POST':          return {'method': 'POST', 'data': request.DATA} +    elif request.method == 'PUT': +        return {'method': 'PUT', 'data': request.DATA}  class ClassBasedViewIntegrationTests(TestCase): | 
