Skip to content

Commit e473bc3

Browse files
authored
chore: add Django 3.2 to test grid (#117)
https://docs.djangoproject.com/en/3.2/releases/3.2/ I really need to drop support for old versions now. Lots of deps are starting to step on each other and drop things. Django itself doesn't support Django 3.0 anymore with the release of Django 3.2
1 parent 9bb736a commit e473bc3

File tree

5 files changed

+13
-6
lines changed

5 files changed

+13
-6
lines changed

.travis.yml

+3
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ jobs:
6363
- stage: test
6464
python: 3.8
6565
env: TOX_ENV=django31-py38
66+
- stage: test
67+
python: 3.8
68+
env: TOX_ENV=django32-py38
6669
- stage: lint
6770
install: pip install black
6871
script: black --check .

django_object_actions/tests/test_admin.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"""
44
from django.contrib.admin.utils import quote
55
from django.http import HttpResponse
6-
from mock import patch
6+
from unittest.mock import patch
77

88
try:
99
from django.urls import reverse

example_project/polls/factories.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from . import models
99

1010

11-
class UserFactory(factory.DjangoModelFactory):
11+
class UserFactory(factory.django.DjangoModelFactory):
1212
class Meta:
1313
model = get_user_model()
1414

@@ -19,15 +19,15 @@ class Meta:
1919
password = factory.PostGenerationMethodCall("set_password", "password")
2020

2121

22-
class PollFactory(factory.DjangoModelFactory):
22+
class PollFactory(factory.django.DjangoModelFactory):
2323
class Meta:
2424
model = models.Poll
2525

2626
question = factory.Faker("sentence")
2727
pub_date = factory.LazyAttribute(lambda __: timezone.now())
2828

2929

30-
class ChoiceFactory(factory.DjangoModelFactory):
30+
class ChoiceFactory(factory.django.DjangoModelFactory):
3131
class Meta:
3232
model = models.Choice
3333

@@ -36,7 +36,7 @@ class Meta:
3636
votes = factory.Faker("pyint")
3737

3838

39-
class CommentFactory(factory.DjangoModelFactory):
39+
class CommentFactory(factory.django.DjangoModelFactory):
4040
class Meta:
4141
model = models.Comment
4242

@@ -47,7 +47,7 @@ def get_random_string(length):
4747
return result_str
4848

4949

50-
class RelatedDataFactory(factory.DjangoModelFactory):
50+
class RelatedDataFactory(factory.django.DjangoModelFactory):
5151
id = factory.lazy_attribute(
5252
lambda __: "{}:{}-{}!{}".format(
5353
get_random_string(2),

example_project/settings.py

+2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ def project_dir(*paths):
1616
default="sqlite:///" + project_dir("example_project.db")
1717
)
1818
}
19+
DEFAULT_AUTO_FIELD = "django.db.models.AutoField"
1920

2021
# Local time zone for this installation. Choices can be found here:
2122
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
@@ -72,6 +73,7 @@ def project_dir(*paths):
7273
"APP_DIRS": True,
7374
"OPTIONS": {
7475
"context_processors": [
76+
"django.template.context_processors.request",
7577
"django.contrib.auth.context_processors.auth",
7678
"django.contrib.messages.context_processors.messages",
7779
]

tox.ini

+2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ envlist =
1111
django22-{py36,py37},
1212
django30-{py36,py37,py38},
1313
django31-{py36,py37,py38},
14+
django32-{py36,py37,py38},
1415
# run one of the tests again but with coverage
1516
coveralls-django21-py37,
1617
skipsdist = True
@@ -31,6 +32,7 @@ deps =
3132
django22: Django<2.3
3233
django30: Django<3.1
3334
django31: Django<3.2
35+
django32: Django<3.3
3436

3537
[testenv:coveralls-django21-py37]
3638
commands =

0 commit comments

Comments
 (0)