Skip to content

Commit 0e92e01

Browse files
authored
Tested against Django 3.1 and 3.2 (#371)
* build: Tested against Django 3.1 and 3.2 * fix: integration tests for Django 3.2
1 parent 0cc33bb commit 0e92e01

File tree

6 files changed

+19
-5
lines changed

6 files changed

+19
-5
lines changed

.github/workflows/ci.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414

1515
matrix:
1616
python-version: ["2.7", "3.6", "3.7", "3.8"]
17-
django-version: ["1.11", "2.0", "2.2", "2.1", "3.0"]
17+
django-version: ["1.11", "2.0", "2.2", "2.1", "3.0", "3.1","3.2"]
1818
es-dsl-version: ["6.4", "7.4"]
1919
es-version: ["7.13.4"]
2020

@@ -27,6 +27,10 @@ jobs:
2727
django-version: "2.2"
2828
- python-version: "2.7"
2929
django-version: "3.0"
30+
- python-version: "2.7"
31+
django-version: "3.1"
32+
- python-version: "2.7"
33+
django-version: "3.2"
3034

3135
- python-version: "3.8"
3236
django-version: "1.11"

example/example/settings.py

+5
Original file line numberDiff line numberDiff line change
@@ -127,3 +127,8 @@
127127
# https://docs.djangoproject.com/en/1.9/howto/static-files/
128128

129129
STATIC_URL = '/static/'
130+
131+
# Default primary key field type
132+
# https://docs.djangoproject.com/en/3.2/ref/settings/#default-auto-field
133+
134+
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'

runtests.py

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ def get_settings():
3030
'127.0.0.1:9200')
3131
},
3232
},
33+
DEFAULT_AUTO_FIELD="django.db.models.BigAutoField",
3334
)
3435

3536
try:

setup.py

+2
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@
5656
'Framework :: Django :: 2.1',
5757
'Framework :: Django :: 2.2',
5858
'Framework :: Django :: 3.0',
59+
'Framework :: Django :: 3.1',
60+
'Framework :: Django :: 3.2',
5961
'Intended Audience :: Developers',
6062
'License :: OSI Approved :: BSD License',
6163
'Natural Language :: English',

tests/test_integration.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ def test_get_doc_with_many_to_many_relationships(self):
122122
{
123123
'title': self.category1.title,
124124
'slug': self.category1.slug,
125-
'icon': self.category1.icon,
125+
'icon': self.category1.icon.url,
126126
},
127127
{
128128
'title': self.category2.title,
@@ -147,7 +147,7 @@ def test_doc_to_dict(self):
147147
'categories': [{
148148
'title': self.category1.title,
149149
'slug': self.category1.slug,
150-
'icon': self.category1.icon,
150+
'icon': self.category1.icon.url,
151151
}]
152152
})
153153

@@ -163,7 +163,7 @@ def test_doc_to_dict(self):
163163
{
164164
'title': self.category1.title,
165165
'slug': self.category1.slug,
166-
'icon': self.category1.icon,
166+
'icon': self.category1.icon.url,
167167
},
168168
{
169169
'title': self.category2.title,

tox.ini

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[tox]
22
envlist =
33
py27-django-111-es74
4-
{py36,py37,py38}-django-{111,20,21,22,30}-{es64,es74}
4+
{py36,py37,py38}-django-{111,20,21,22,30,31,32}-{es64,es74}
55

66
[testenv]
77
setenv =
@@ -14,6 +14,8 @@ deps =
1414
django-21: Django>=2.1,<2.2
1515
django-22: Django>=2.2,<2.3
1616
django-30: Django>=3.0,<3.1
17+
django-31: Django>=3.1,<3.2
18+
django-32: Django>=3.2,<3.3
1719
es64: elasticsearch-dsl>=6.4.0,<7.0.0
1820
es74: elasticsearch-dsl>=7.4.0,<8
1921
-r{toxinidir}/requirements_test.txt

0 commit comments

Comments
 (0)