-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #82 from caktus/django-42-upgrade
Django 4.x Support
- Loading branch information
Showing
12 changed files
with
47 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,4 @@ _build | |
.coverage | ||
.envrc | ||
.direnv | ||
.vscode/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,6 @@ | |
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [] | ||
|
||
operations = [ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,6 @@ | |
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("bread", "0001_initial"), | ||
] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,26 @@ | ||
import factory | ||
import factory.fuzzy | ||
|
||
from .models import BreadLabelValueTestModel, BreadTestModel, BreadTestModel2 | ||
|
||
|
||
class BreadTestModel2Factory(factory.DjangoModelFactory): | ||
FACTORY_FOR = BreadTestModel2 | ||
class BreadTestModel2Factory(factory.django.DjangoModelFactory): | ||
class Meta: | ||
model = BreadTestModel2 | ||
|
||
text = factory.fuzzy.FuzzyText(length=10) | ||
text = factory.Faker("text", max_nb_chars=10) | ||
|
||
|
||
class BreadTestModelFactory(factory.DjangoModelFactory): | ||
FACTORY_FOR = BreadTestModel | ||
class BreadTestModelFactory(factory.django.DjangoModelFactory): | ||
class Meta: | ||
model = BreadTestModel | ||
|
||
name = factory.fuzzy.FuzzyText(length=10) | ||
age = factory.fuzzy.FuzzyInteger(low=1, high=99) | ||
name = factory.Faker("name") | ||
age = factory.Faker("pyint", min_value=0, max_value=99) | ||
other = factory.SubFactory(BreadTestModel2Factory) | ||
|
||
|
||
class BreadLabelValueTestModelFactory(factory.DjangoModelFactory): | ||
FACTORY_FOR = BreadLabelValueTestModel | ||
class BreadLabelValueTestModelFactory(factory.django.DjangoModelFactory): | ||
class Meta: | ||
model = BreadLabelValueTestModel | ||
|
||
name = factory.fuzzy.FuzzyText(length=10) | ||
name = factory.Faker("name") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
[tox] | ||
envlist = {py37,py38,py39}-django{22,32},py310-django32 | ||
envlist = {py38,py39,py310}-django{32,41,42} | ||
|
||
[gh-actions] | ||
python = | ||
3.7: py37 | ||
3.8: py38 | ||
3.9: py39 | ||
3.10: py310 | ||
|
||
[testenv] | ||
deps = | ||
factory_boy==2.3.1 | ||
django22: Django>=2.2,<3.0 | ||
factory_boy==3.2.1 | ||
django32: Django>=3.2,<4.0 | ||
django41: Django>=4.1,<4.2 | ||
django42: Django>=4.2,<5.0 | ||
commands = python -Wmodule runtests.py |