diff --git a/.travis.yml b/.travis.yml index e4f645d6..654107d4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,21 +6,19 @@ env: - TOX_ENV=py27-dj17-drf33 - TOX_ENV=py27-dj18-drf33 - TOX_ENV=py27-dj19-drf33 - - TOX_ENV=py27-dj110a-drf33 - - TOX_ENV=py32-dj17-drf33 + - TOX_ENV=py27-dj110-drf33 - TOX_ENV=py33-dj17-drf33 - TOX_ENV=py34-dj17-drf33 - - TOX_ENV=py32-dj18-drf33 - TOX_ENV=py33-dj18-drf33 - TOX_ENV=py34-dj18-drf33 - TOX_ENV=py35-dj18-drf33 - TOX_ENV=py34-dj19-drf33 - TOX_ENV=py35-dj19-drf33 - - TOX_ENV=py34-dj110a-drf33 - - TOX_ENV=py35-dj110a-drf33 + - TOX_ENV=py34-dj110-drf33 + - TOX_ENV=py35-dj110-drf33 install: - - travis_retry pip install "virtualenv<14.0.0" "tox>=1.9" + - travis_retry pip install virtualenv tox script: - tox -e $TOX_ENV diff --git a/README.md b/README.md index dc739884..b0b76d3e 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,7 @@ Supported Django versions: * Django 1.7 * Django 1.8 * Django 1.9 + * Django 1.10 Supported Django Rest Framework versions: @@ -556,7 +557,7 @@ In this extremely short tutorial we are going to mimic the simplest flow: regist `$ curl -X POST http://127.0.0.1:8088/auth/register/ --data 'username=djoser&password=djoser'` - `{"email": "", "username": "djoser"}` + `{"email": "", "username": "djoser", "id":1}` So far, so good. We have just created a new user using REST API. @@ -586,7 +587,7 @@ In this extremely short tutorial we are going to mimic the simplest flow: regist `$ curl -X GET http://127.0.0.1:8088/auth/me/ -H 'Authorization: Token b704c9fc3655635646356ac2950269f352ea1139'` - `{"email": "", "username": "djoser"}` + `{"email": "", "username": "djoser", "id": 1}` Yay, it works! diff --git a/testproject/testapp/tests.py b/testproject/testapp/tests.py index 0c5fd492..1fe9440c 100644 --- a/testproject/testapp/tests.py +++ b/testproject/testapp/tests.py @@ -166,8 +166,8 @@ def test_post_should_login_user(self): self.assertEqual(response.data['auth_token'], user.auth_token.key) self.assertTrue(self.signal_sent) - @unittest2.skipIf(django.VERSION >= (1, 10, 0, 'alpha', 1), - "in this version authenticate() returns None if user is inactive") + @unittest2.skipIf(django.VERSION >= (1, 10), + "in this version authenticate() returns None if user is inactive") def test_post_should_not_login_if_user_is_not_active(self): user = create_user() data = { @@ -185,8 +185,8 @@ def test_post_should_not_login_if_user_is_not_active(self): self.assertEqual(response.data['non_field_errors'], [djoser.constants.INACTIVE_ACCOUNT_ERROR]) self.assertFalse(self.signal_sent) - @unittest2.skipIf(django.VERSION < (1, 10, 0, 'alpha', 1), - "in these versions authenticate() succeedes if user is inactive") + @unittest2.skipIf(django.VERSION < (1, 10), + "in these versions authenticate() succeedes if user is inactive") def test_post_should_not_login_if_user_is_not_active(self): user = create_user() data = { diff --git a/tox.ini b/tox.ini index dd9bfa1c..99d3a827 100644 --- a/tox.ini +++ b/tox.ini @@ -1,15 +1,14 @@ [tox] downloadcache = {toxworkdir}/cache/ envlist = - py27-dj{17,18,19,110a}-drf33, - py{32,33,34}-dj17-drf33, - py{32,33,34,35}-dj18-drf33, - py{34,35}-dj{19,110a}-drf33 + py27-dj{17,18,19,110}-drf33, + py{33,34}-dj17-drf33, + py{33,34,35}-dj18-drf33, + py{34,35}-dj{19,110}-drf33 [testenv] basepython = py27: python2.7 - py32: python3.2 py33: python3.3 py34: python3.4 py35: python3.5 @@ -17,10 +16,8 @@ deps = dj17: django>=1.7,<1.8 dj18: django>=1.8,<1.9 dj19: django>=1.9,<1.10 - dj110a: django>=1.10a,<1.11 - drf32: djangorestframework>=3.2,<3.3 + dj110: django>=1.10,<1.11 drf33: djangorestframework>=3.3,<3.4 - py32: mock<1.1 - py{26,27}: mock + py27: mock -rrequirements-test.txt commands = coverage run --source=djoser testproject/manage.py test testapp