Skip to content

Commit

Permalink
changed tox config to use Django<1.8 for DRF<3 [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
miki725 committed Apr 26, 2015
1 parent fb4b375 commit e87d53a
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
18 changes: 18 additions & 0 deletions rest_framework_bulk/tests/test_generics.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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.
Expand Down
16 changes: 16 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit e87d53a

Please sign in to comment.