From e87d53a3f55471e55e58bbbc1f76514047eecc43 Mon Sep 17 00:00:00 2001 From: Miroslav Shubernetskiy Date: Sun, 26 Apr 2015 18:34:56 -0400 Subject: [PATCH] changed tox config to use Django<1.8 for DRF<3 [ci skip] --- rest_framework_bulk/tests/test_generics.py | 18 ++++++++++++++++++ tox.ini | 16 ++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/rest_framework_bulk/tests/test_generics.py b/rest_framework_bulk/tests/test_generics.py index 5522948..51bdb15 100644 --- a/rest_framework_bulk/tests/test_generics.py +++ b/rest_framework_bulk/tests/test_generics.py @@ -1,5 +1,7 @@ from __future__ import unicode_literals, print_function import json +import unittest + from django.core.urlresolvers import reverse from django.test import TestCase from django.test.client import RequestFactory @@ -83,6 +85,22 @@ def test_put(self): ] ) + @unittest.skip('') + def test_put_without_update_key(self): + """ + Test that PUT request updates all submitted resources. + """ + response = self.view(self.request.put( + '', + json.dumps([ + {'contents': 'foo', 'number': 3}, + {'contents': 'bar', 'number': 4, 'id': 555}, # non-existing id + ]), + content_type='application/json', + )) + + self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST) + def test_patch(self): """ Test that PATCH request partially updates all submitted resources. diff --git a/tox.ini b/tox.ini index eb4c9a1..0af40aa 100644 --- a/tox.ini +++ b/tox.ini @@ -20,5 +20,21 @@ deps = whitelist_externals = make +[testenv:py27-drf2] +deps = + django<1.8 + +[testenv:py34-drf2] +deps = + django<1.8 + +[testenv:pypy-drf2] +deps = + django<1.8 + +[testenv:pypy3-drf2] +deps = + django<1.8 + [flake8] max-line-length = 100