@@ -258,7 +258,10 @@ def resp_get_active_services(url, request):
258
258
259
259
260
260
@urlmatch (
261
- scheme = "http" , netloc = "localhost" , path = "/api/v4/projects/1/pipeline_schedules$" , method = "post" ,
261
+ scheme = "http" ,
262
+ netloc = "localhost" ,
263
+ path = "/api/v4/projects/1/pipeline_schedules$" ,
264
+ method = "post" ,
262
265
)
263
266
def resp_create_project_pipeline_schedule (url , request ):
264
267
"""Mock for creating project pipeline Schedules POST response."""
@@ -287,7 +290,10 @@ def resp_create_project_pipeline_schedule(url, request):
287
290
288
291
289
292
@urlmatch (
290
- scheme = "http" , netloc = "localhost" , path = "/api/v4/projects/1/pipeline_schedules/14/play" , method = "post" ,
293
+ scheme = "http" ,
294
+ netloc = "localhost" ,
295
+ path = "/api/v4/projects/1/pipeline_schedules/14/play" ,
296
+ method = "post" ,
291
297
)
292
298
def resp_play_project_pipeline_schedule (url , request ):
293
299
"""Mock for playing a project pipeline schedule POST response."""
@@ -522,22 +528,20 @@ def test_update_service(self):
522
528
523
529
524
530
class TestProjectPipelineSchedule (TestProject ):
525
-
526
- @ with_httmock ( resp_create_project_pipeline_schedule ,
527
- resp_play_project_pipeline_schedule )
531
+ @ with_httmock (
532
+ resp_create_project_pipeline_schedule , resp_play_project_pipeline_schedule
533
+ )
528
534
def test_project_pipeline_schedule_play (self ):
529
- description = 'Build packages'
530
- cronline = '0 1 * * 5'
531
- sched = self .project .pipelineschedules .create ({
532
- 'ref' : 'master' ,
533
- 'description' : description ,
534
- 'cron' : cronline })
535
+ description = "Build packages"
536
+ cronline = "0 1 * * 5"
537
+ sched = self .project .pipelineschedules .create (
538
+ {"ref" : "master" , "description" : description , "cron" : cronline }
539
+ )
535
540
self .assertIsNotNone (sched )
536
541
self .assertEqual (description , sched .description )
537
542
self .assertEqual (cronline , sched .cron )
538
543
539
544
play_result = sched .play ()
540
545
self .assertIsNotNone (play_result )
541
- self .assertIn ('message' , play_result )
542
- self .assertEqual ('201 Created' , play_result ['message' ])
543
-
546
+ self .assertIn ("message" , play_result )
547
+ self .assertEqual ("201 Created" , play_result ["message" ])
0 commit comments