Skip to content

chore: add Django 3.2 to test grid #117

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 9 commits into from
Apr 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ jobs:
- stage: test
python: 3.8
env: TOX_ENV=django31-py38
- stage: test
python: 3.8
env: TOX_ENV=django32-py38
- stage: lint
install: pip install black
script: black --check .
Expand Down
2 changes: 1 addition & 1 deletion django_object_actions/tests/test_admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""
from django.contrib.admin.utils import quote
from django.http import HttpResponse
from mock import patch
from unittest.mock import patch

try:
from django.urls import reverse
Expand Down
10 changes: 5 additions & 5 deletions example_project/polls/factories.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from . import models


class UserFactory(factory.DjangoModelFactory):
class UserFactory(factory.django.DjangoModelFactory):
class Meta:
model = get_user_model()

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


class PollFactory(factory.DjangoModelFactory):
class PollFactory(factory.django.DjangoModelFactory):
class Meta:
model = models.Poll

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


class ChoiceFactory(factory.DjangoModelFactory):
class ChoiceFactory(factory.django.DjangoModelFactory):
class Meta:
model = models.Choice

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


class CommentFactory(factory.DjangoModelFactory):
class CommentFactory(factory.django.DjangoModelFactory):
class Meta:
model = models.Comment

Expand All @@ -47,7 +47,7 @@ def get_random_string(length):
return result_str


class RelatedDataFactory(factory.DjangoModelFactory):
class RelatedDataFactory(factory.django.DjangoModelFactory):
id = factory.lazy_attribute(
lambda __: "{}:{}-{}!{}".format(
get_random_string(2),
Expand Down
2 changes: 2 additions & 0 deletions example_project/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ def project_dir(*paths):
default="sqlite:///" + project_dir("example_project.db")
)
}
DEFAULT_AUTO_FIELD = "django.db.models.AutoField"

# Local time zone for this installation. Choices can be found here:
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
Expand Down Expand Up @@ -72,6 +73,7 @@ def project_dir(*paths):
"APP_DIRS": True,
"OPTIONS": {
"context_processors": [
"django.template.context_processors.request",
"django.contrib.auth.context_processors.auth",
"django.contrib.messages.context_processors.messages",
]
Expand Down
2 changes: 2 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ envlist =
django22-{py36,py37},
django30-{py36,py37,py38},
django31-{py36,py37,py38},
django32-{py36,py37,py38},
# run one of the tests again but with coverage
coveralls-django21-py37,
skipsdist = True
Expand All @@ -31,6 +32,7 @@ deps =
django22: Django<2.3
django30: Django<3.1
django31: Django<3.2
django32: Django<3.3

[testenv:coveralls-django21-py37]
commands =
Expand Down