File tree 5 files changed +13
-6
lines changed
django_object_actions/tests
5 files changed +13
-6
lines changed Original file line number Diff line number Diff line change 63
63
- stage : test
64
64
python : 3.8
65
65
env : TOX_ENV=django31-py38
66
+ - stage : test
67
+ python : 3.8
68
+ env : TOX_ENV=django32-py38
66
69
- stage : lint
67
70
install : pip install black
68
71
script : black --check .
Original file line number Diff line number Diff line change 3
3
"""
4
4
from django .contrib .admin .utils import quote
5
5
from django .http import HttpResponse
6
- from mock import patch
6
+ from unittest . mock import patch
7
7
8
8
try :
9
9
from django .urls import reverse
Original file line number Diff line number Diff line change 8
8
from . import models
9
9
10
10
11
- class UserFactory (factory .DjangoModelFactory ):
11
+ class UserFactory (factory .django . DjangoModelFactory ):
12
12
class Meta :
13
13
model = get_user_model ()
14
14
@@ -19,15 +19,15 @@ class Meta:
19
19
password = factory .PostGenerationMethodCall ("set_password" , "password" )
20
20
21
21
22
- class PollFactory (factory .DjangoModelFactory ):
22
+ class PollFactory (factory .django . DjangoModelFactory ):
23
23
class Meta :
24
24
model = models .Poll
25
25
26
26
question = factory .Faker ("sentence" )
27
27
pub_date = factory .LazyAttribute (lambda __ : timezone .now ())
28
28
29
29
30
- class ChoiceFactory (factory .DjangoModelFactory ):
30
+ class ChoiceFactory (factory .django . DjangoModelFactory ):
31
31
class Meta :
32
32
model = models .Choice
33
33
@@ -36,7 +36,7 @@ class Meta:
36
36
votes = factory .Faker ("pyint" )
37
37
38
38
39
- class CommentFactory (factory .DjangoModelFactory ):
39
+ class CommentFactory (factory .django . DjangoModelFactory ):
40
40
class Meta :
41
41
model = models .Comment
42
42
@@ -47,7 +47,7 @@ def get_random_string(length):
47
47
return result_str
48
48
49
49
50
- class RelatedDataFactory (factory .DjangoModelFactory ):
50
+ class RelatedDataFactory (factory .django . DjangoModelFactory ):
51
51
id = factory .lazy_attribute (
52
52
lambda __ : "{}:{}-{}!{}" .format (
53
53
get_random_string (2 ),
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ def project_dir(*paths):
16
16
default = "sqlite:///" + project_dir ("example_project.db" )
17
17
)
18
18
}
19
+ DEFAULT_AUTO_FIELD = "django.db.models.AutoField"
19
20
20
21
# Local time zone for this installation. Choices can be found here:
21
22
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
@@ -72,6 +73,7 @@ def project_dir(*paths):
72
73
"APP_DIRS" : True ,
73
74
"OPTIONS" : {
74
75
"context_processors" : [
76
+ "django.template.context_processors.request" ,
75
77
"django.contrib.auth.context_processors.auth" ,
76
78
"django.contrib.messages.context_processors.messages" ,
77
79
]
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ envlist =
11
11
django22-{py36,py37},
12
12
django30-{py36,py37,py38},
13
13
django31-{py36,py37,py38},
14
+ django32-{py36,py37,py38},
14
15
# run one of the tests again but with coverage
15
16
coveralls-django21-py37,
16
17
skipsdist = True
31
32
django22: Django<2.3
32
33
django30: Django<3.1
33
34
django31: Django<3.2
35
+ django32: Django<3.3
34
36
35
37
[testenv:coveralls-django21-py37]
36
38
commands =
You can’t perform that action at this time.
0 commit comments