Skip to content

Commit

Permalink
fix: fix test suite
Browse files Browse the repository at this point in the history
  • Loading branch information
Yelinz committed Nov 17, 2023
1 parent 545c36a commit 7ab27b2
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python: [3.6, 3.7, 3.8, 3.9.0-rc - 3.9]
python: [3.7, 3.8, 3.9]
steps:
- uses: actions/checkout@v2
- name: Setup Python
Expand All @@ -23,7 +23,7 @@ jobs:
run: |
python -m pip install --upgrade pip setuptools
- name: Install dependencies
run: pip install tox tox-factor
run: pip install tox
- name: Run Tox
run: python -m tox -f py$(python --version 2>&1 | cut -c 8,10)

Expand Down
11 changes: 10 additions & 1 deletion tests/migrations/0001_initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class Migration(migrations.Migration):

initial = True

dependencies = []
Expand All @@ -30,6 +29,16 @@ class Migration(migrations.Migration):
verbose_name="Text comes here",
),
),
(
"model2",
models.ForeignKey(
help_text="Model2 description.",
on_delete=models.CASCADE,
related_name="model1s",
to="tests.Model2",
verbose_name="Model2",
),
),
],
options={"abstract": False},
),
Expand Down
7 changes: 7 additions & 0 deletions tests/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ class Model1(BaseModel):
verbose_name=_("Text comes here"),
help_text=_("Text description."),
)
model2 = models.ForeignKey(
"tests.Model2",
on_delete=models.CASCADE,
related_name="model1s",
verbose_name=_("Model2"),
help_text=_("Model2 description."),
)


class Model2(BaseModel):
Expand Down
14 changes: 7 additions & 7 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,25 @@

[tox]
envlist =
{py36,py37,py38}-django22,
{py36,py37,py38}-django30,
{py36,py37,py38,py39}-django31,
{py37,py38,py39}-django31,
{py37,py38,py39}-django32,
{py38,py39}-latest,
flake8, black

[latest]
deps =
https://github.com/django/django/archive/main.tar.gz
https://github.com/encode/django-rest-framework/archive/master.tar.gz
https://github.com/django-json-api/django-rest-framework-json-api/archive/master.tar.gz

[testenv]
deps=
django22: django~=2.2.0
django30: django~=3.0.0
django31: django~=3.1.0
django22: djangorestframework~=3.11.0
django30: djangorestframework~=3.11.0
django32: django~=3.2.0
django31: djangorestframework~=3.11.0
django32: djangorestframework~=3.14.0
django31: djangorestframework-jsonapi~=6.1.0
django32: djangorestframework-jsonapi~=6.1.0
latest: {[latest]deps}
pytest
pytest-cov
Expand Down

0 comments on commit 7ab27b2

Please sign in to comment.