@@ -154,6 +154,19 @@ def test_update_data(settings, patched_update):
154154 _verify_update (settings , patched_update , data = {"a" : 1 })
155155
156156
157+ def test_increment_value (settings , patched_update ):
158+ api_task = task_for_test ()
159+ task = Task (api_task )
160+
161+ patched_update .return_value = Response (HTTPStatus .OK , b"" , {}, task_for_test (value = 10 ))
162+
163+ task .increment_value (10 )
164+ _verify_update (settings , patched_update , value = 10 )
165+
166+ task .increment_value (5 )
167+ _verify_update (settings , patched_update , value = 15 )
168+
169+
157170def test_ping (settings , patched_update ):
158171 task = Task (task_for_test ())
159172
@@ -179,18 +192,18 @@ def test_update_progress_rate_limit(settings, patched_update):
179192
180193 updated_at = task .updated
181194 patched_update .return_value = Response (HTTPStatus .OK , b"" , {}, task_for_test ())
182- task .update_progress (2 , rate_limit = 1 )
195+ task .update_value (2 , rate_limit = 1 )
183196 assert len (patched_update .call_args_list ) == 0
184197
185- task .update_progress (2 )
198+ task .update_value (2 )
186199 _verify_update (settings , patched_update , value = 2 )
187200 assert task .updated > updated_at
188201
189- task .update_progress (3 , rate_limit = 1 )
202+ task .update_value (3 , rate_limit = 1 )
190203 assert len (patched_update .call_args_list ) == 1
191204
192205 task ._task .updated = task ._task .updated - datetime .timedelta (seconds = 1 )
193- task .update_progress (3 , rate_limit = 1 )
206+ task .update_value (3 , rate_limit = 1 )
194207 assert len (patched_update .call_args_list ) == 2
195208
196209
0 commit comments