Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Run tests against Python 3.9 #1270

Merged
merged 3 commits into from Sep 23, 2020
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/tests.yml
Expand Up @@ -6,8 +6,9 @@ jobs:
tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [3.5, 3.6, 3.7, 3.8]
python-version: [3.5, 3.6, 3.7, 3.8, 3.9.0-rc - 3.9]

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Expand Up @@ -21,7 +21,7 @@ Full documentation on `read the docs`_.
Requirements
------------

* **Python**: 3.5, 3.6, 3.7, 3.8
* **Python**: 3.5, 3.6, 3.7, 3.8, 3.9
* **Django**: 2.2, 3.0, 3.1
* **DRF**: 3.10+

Expand Down
1 change: 1 addition & 0 deletions setup.py
Expand Up @@ -52,6 +52,7 @@
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Framework :: Django',
],
zip_safe=False,
Expand Down
8 changes: 7 additions & 1 deletion tests/utils.py
Expand Up @@ -3,13 +3,19 @@
from django.db import models


class QuerySet(models.QuerySet):

def __bool__(self):
return True


class MockQuerySet:
"""
Generate a mock that is suitably similar to a QuerySet
"""

def __new__(self):
m = mock.Mock(spec_set=models.QuerySet())
m = mock.Mock(spec_set=QuerySet())
m.filter.return_value = m
m.all.return_value = m
return m
4 changes: 2 additions & 2 deletions tox.ini
Expand Up @@ -2,8 +2,8 @@
envlist =
{py35,py36,py37}-django22,
{py36,py37,py38}-django30,
{py36,py37,py38}-django31,
{py36,py37,py38}-latest,
{py36,py37,py38,py39}-django31,
{py36,py37,py38,py39}-latest,
isort,lint,docs,warnings,


Expand Down