Skip to content

Commit 3e05c90

Browse files
clemfromspacePLNech
authored andcommitted
fix(tests) Add tox envs for Django 1.10,1.11,2.0 (#257)
| Q | A | ----------------- | ---------- | Bug fix? | no | New feature? | no | BC breaks? | no | Related Issue | None | Need Doc update | no ## What was changed - [x] Updated the `tox.ini` and `travis.yml` files, adding the env for the `1.10`, `1.11` and `2.0` Django versions. - [x] Fixed two tests that was failing on Django `2.0` (not impacting the previous versions). ## Why it was changed So we are sure we are compatibles with the version stated in the README :)
1 parent e9777fd commit 3e05c90

File tree

4 files changed

+37
-3
lines changed

4 files changed

+37
-3
lines changed

.travis.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,42 @@ matrix:
1414
env: TOXENV=py27-django18
1515
- python: 2.7
1616
env: TOXENV=py27-django19
17+
- python: 2.7
18+
env: TOXENV=py27-django110
19+
- python: 2.7
20+
env: TOXENV=py27-django111
1721
- python: 3.4
1822
env: TOXENV=py34-django17
1923
- python: 3.4
2024
env: TOXENV=py34-django18
2125
- python: 3.4
2226
env: TOXENV=py34-django19
27+
- python: 3.4
28+
env: TOXENV=py34-django110
29+
- python: 3.4
30+
env: TOXENV=py34-django111
31+
- python: 3.4
32+
env: TOXENV=py34-django20
2333
- python: 3.5
2434
env: TOXENV=py35-django18
2535
- python: 3.5
2636
env: TOXENV=py35-django19
37+
- python: 3.5
38+
env: TOXENV=py35-django110
39+
- python: 3.5
40+
env: TOXENV=py35-django111
41+
- python: 3.5
42+
env: TOXENV=py35-django20
2743
- python: 3.6
2844
env: TOXENV=py36-django18
2945
- python: 3.6
3046
env: TOXENV=py36-django19
47+
- python: 3.6
48+
env: TOXENV=py36-django110
49+
- python: 3.6
50+
env: TOXENV=py36-django111
51+
- python: 3.6
52+
env: TOXENV=py36-django20
3153
env:
3254
global:
3355
- secure: BvefwB7dAyxeVeIwaDoklOwE04DkuP4xqj18awneFYJdln2qWUB/AcchVGrp6Toi1XnL+4e/CkSRbj/XLr3FBceARknfgzT3zp7BQyJLREAXFXV75dcCtcN9Jxh4IMpNlLTcZcB8OvU+edrRulmsOR0hXIie8rLg3pt+2LfGxhVzaUBq6F9vv+Db7tdZ+DNnciA+geJQZ+ThtxxUzVcNqCgTvQSrPYMGx07ScEG6MuEakHopEVuTE3n7hiOZW/17sS4uBfj+JwL3RX1gg/lnobbicYxBJ+WzuIP2cpVGLDJDwnclqlAezPMEG0AymeOrM9/5fYRkyawOyeaJZFmcd4cqnKurG/lDmidABzB3LXYWnAYVMOsQ5R9JqRRa+AVHt8u1wJZu4VXMoI7AtLHaMCVBO0iAGkH7dD41oy/aMzN63bIp+ANo7seIouxRfCX62H5+1unUbYYExsKvUhwb7uSLLq67QcbkudklIpb/xsNkueqFgJ9APBH3/K7MYjRjPrCA8pjOgnWXyzJRty+fZctrJZTbWg9ubky7t/48enDmFzDOgMjnEtkKAXYO7lHDEsA2HceLtYx08VI9Hfry579AhdqZSRaXZejSN8ZUIOHJLXT+2Md35IuySTpqkQiEjDYWwhLooEFvrirVB+3YCw6Sw6kAoT7P5FS2hOOZtKw=

tests/models.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,5 +70,8 @@ def property_string(self):
7070

7171

7272
class BlogPost(models.Model):
73-
author = models.ForeignKey(User)
73+
author = models.ForeignKey(
74+
User,
75+
on_delete=models.CASCADE
76+
)
7477
text = models.TextField(default="")

tests/test_commands.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,11 @@ def test_clearindex(self):
8989
self.assertRegexpMatches(result, regex)
9090

9191
def test_clearindex_with_args(self):
92-
call_command('algolia_clearindex', stdout=self.out,
93-
model=['Website'], batchsize=3)
92+
call_command(
93+
'algolia_clearindex',
94+
stdout=self.out,
95+
model=['Website']
96+
)
9497
result = self.out.getvalue()
9598

9699
regex = r'Website'

tox.ini

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ envlist =
33
{py27,py34}-django17
44
{py27,py34,py35,py36}-django18
55
{py27,py34,py35,py36}-django19
6+
{py27,py34,py35,py36}-django110
7+
{py27,py34,py35,py36}-django111
8+
{py34,py35,py36}-django20
69
coverage
710
skip_missing_interpreters = True
811

@@ -11,6 +14,9 @@ deps =
1114
django17: Django>=1.7,<1.8
1215
django18: Django>=1.8,<1.9
1316
django19: Django>=1.9,<1.10
17+
django110: Django>=1.10,<1.11
18+
django111: Django>=1.11,<2.0
19+
django20: Django>=2.0,<2.1
1420
passenv =
1521
ALGOLIA*
1622
TRAVIS*

0 commit comments

Comments
 (0)