@@ -18,7 +18,7 @@ def setUp(self):
18
18
self .project = get (Project , container_time_limit = None )
19
19
self .version = get (Version , project = self .project )
20
20
21
- @mock .patch ('readthedocs.projects.tasks.UpdateDocsTask ' )
21
+ @mock .patch ('readthedocs.projects.tasks.update_docs_task ' )
22
22
def test_trigger_custom_queue (self , update_docs ):
23
23
"""Use a custom queue when routing the task"""
24
24
self .project .build_queue = 'build03'
@@ -34,17 +34,17 @@ def test_trigger_custom_queue(self, update_docs):
34
34
'time_limit' : 720 ,
35
35
'soft_time_limit' : 600 ,
36
36
}
37
- update_docs () .signature .assert_has_calls ([
37
+ update_docs .signature .assert_has_calls ([
38
38
mock .call (
39
- (self .project .pk ,),
39
+ args = (self .project .pk ,),
40
40
kwargs = kwargs ,
41
41
options = options ,
42
42
immutable = True ,
43
43
),
44
44
])
45
- update_docs () .signature ().apply_async .assert_called ()
45
+ update_docs .signature ().apply_async .assert_called ()
46
46
47
- @mock .patch ('readthedocs.projects.tasks.UpdateDocsTask ' )
47
+ @mock .patch ('readthedocs.projects.tasks.update_docs_task ' )
48
48
def test_trigger_build_time_limit (self , update_docs ):
49
49
"""Pass of time limit"""
50
50
trigger_build (project = self .project , version = self .version )
@@ -59,17 +59,17 @@ def test_trigger_build_time_limit(self, update_docs):
59
59
'time_limit' : 720 ,
60
60
'soft_time_limit' : 600 ,
61
61
}
62
- update_docs () .signature .assert_has_calls ([
62
+ update_docs .signature .assert_has_calls ([
63
63
mock .call (
64
- (self .project .pk ,),
64
+ args = (self .project .pk ,),
65
65
kwargs = kwargs ,
66
66
options = options ,
67
67
immutable = True ,
68
68
),
69
69
])
70
- update_docs () .signature ().apply_async .assert_called ()
70
+ update_docs .signature ().apply_async .assert_called ()
71
71
72
- @mock .patch ('readthedocs.projects.tasks.UpdateDocsTask ' )
72
+ @mock .patch ('readthedocs.projects.tasks.update_docs_task ' )
73
73
def test_trigger_build_invalid_time_limit (self , update_docs ):
74
74
"""Time limit as string"""
75
75
self .project .container_time_limit = '200s'
@@ -85,17 +85,17 @@ def test_trigger_build_invalid_time_limit(self, update_docs):
85
85
'time_limit' : 720 ,
86
86
'soft_time_limit' : 600 ,
87
87
}
88
- update_docs () .signature .assert_has_calls ([
88
+ update_docs .signature .assert_has_calls ([
89
89
mock .call (
90
- (self .project .pk ,),
90
+ args = (self .project .pk ,),
91
91
kwargs = kwargs ,
92
92
options = options ,
93
93
immutable = True ,
94
94
),
95
95
])
96
- update_docs () .signature ().apply_async .assert_called ()
96
+ update_docs .signature ().apply_async .assert_called ()
97
97
98
- @mock .patch ('readthedocs.projects.tasks.UpdateDocsTask ' )
98
+ @mock .patch ('readthedocs.projects.tasks.update_docs_task ' )
99
99
def test_trigger_build_rounded_time_limit (self , update_docs ):
100
100
"""Time limit should round down"""
101
101
self .project .container_time_limit = 3
@@ -111,15 +111,15 @@ def test_trigger_build_rounded_time_limit(self, update_docs):
111
111
'time_limit' : 3 ,
112
112
'soft_time_limit' : 3 ,
113
113
}
114
- update_docs () .signature .assert_has_calls ([
114
+ update_docs .signature .assert_has_calls ([
115
115
mock .call (
116
- (self .project .pk ,),
116
+ args = (self .project .pk ,),
117
117
kwargs = kwargs ,
118
118
options = options ,
119
119
immutable = True ,
120
120
),
121
121
])
122
- update_docs () .signature ().apply_async .assert_called ()
122
+ update_docs .signature ().apply_async .assert_called ()
123
123
124
124
def test_slugify (self ):
125
125
"""Test additional slugify"""
0 commit comments