@@ -258,7 +258,10 @@ def resp_get_active_services(url, request):
258258
259259
260260@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" ,
262265)
263266def resp_create_project_pipeline_schedule (url , request ):
264267 """Mock for creating project pipeline Schedules POST response."""
@@ -287,7 +290,10 @@ def resp_create_project_pipeline_schedule(url, request):
287290
288291
289292@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" ,
291297)
292298def resp_play_project_pipeline_schedule (url , request ):
293299 """Mock for playing a project pipeline schedule POST response."""
@@ -522,22 +528,20 @@ def test_update_service(self):
522528
523529
524530class 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+ )
528534 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+ )
535540 self .assertIsNotNone (sched )
536541 self .assertEqual (description , sched .description )
537542 self .assertEqual (cronline , sched .cron )
538543
539544 play_result = sched .play ()
540545 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