1
- import pytest
2
-
3
1
import django_dynamic_fixture as fixture
4
- from django . conf import settings
2
+ import pytest
5
3
6
- from readthedocs .builds .querysets import BuildQuerySet
7
- from readthedocs .builds .models import Build , Version
4
+ from readthedocs .builds .models import Build
8
5
from readthedocs .organizations .models import Organization
9
- from readthedocs .projects .models import Project , Feature
6
+ from readthedocs .projects .models import Project
10
7
11
8
12
9
@pytest .mark .django_db
@@ -18,7 +15,7 @@ def test_concurrent_builds(self):
18
15
max_concurrent_builds = None ,
19
16
main_language_project = None ,
20
17
)
21
- for state in (' triggered' , ' building' , ' cloning' , ' finished' ):
18
+ for state in (" triggered" , " building" , " cloning" , " finished" , "cancelled" ):
22
19
fixture .get (
23
20
Build ,
24
21
project = project ,
@@ -39,7 +36,7 @@ def test_concurrent_builds_project_limited(self):
39
36
max_concurrent_builds = 2 ,
40
37
main_language_project = None ,
41
38
)
42
- for state in (' triggered' , ' building' , ' cloning' , ' finished' ):
39
+ for state in (" triggered" , " building" , " cloning" , " finished" , "cancelled" ):
43
40
fixture .get (
44
41
Build ,
45
42
project = project ,
@@ -58,7 +55,7 @@ def test_concurrent_builds_translations(self):
58
55
max_concurrent_builds = None ,
59
56
main_language_project = project ,
60
57
)
61
- for state in (' triggered' , ' building' , ' cloning' , ' finished' ):
58
+ for state in (" triggered" , " building" , " cloning" , " finished" , "cancelled" ):
62
59
fixture .get (
63
60
Build ,
64
61
project = project ,
@@ -90,7 +87,7 @@ def test_concurrent_builds_organization(self):
90
87
organization .projects .add (project )
91
88
92
89
for project in organization .projects .all ():
93
- for state in (' triggered' , ' building' , ' cloning' , ' finished' ):
90
+ for state in (" triggered" , " building" , " cloning" , " finished" , "cancelled" ):
94
91
fixture .get (
95
92
Build ,
96
93
project = project ,
@@ -124,7 +121,7 @@ def test_concurrent_builds_organization_limited(self):
124
121
)
125
122
organization .projects .add (project_with_builds )
126
123
organization .projects .add (project_without_builds )
127
- for state in (' triggered' , ' building' , ' cloning' , ' finished' ):
124
+ for state in (" triggered" , " building" , " cloning" , " finished" , "cancelled" ):
128
125
fixture .get (
129
126
Build ,
130
127
project = project_with_builds ,
@@ -151,7 +148,7 @@ def test_concurrent_builds_organization_and_project_limited(self):
151
148
)
152
149
organization .projects .add (project_limited )
153
150
organization .projects .add (project_not_limited )
154
- for state in (' triggered' , ' building' , ' cloning' , ' finished' ):
151
+ for state in (" triggered" , " building" , " cloning" , " finished" , "cancelled" ):
155
152
fixture .get (
156
153
Build ,
157
154
project = project_limited ,
0 commit comments