@@ -699,19 +699,19 @@ def setUp(self):
699699 self .admin_token_auth = f"Token { self .admin_token_only_user .auth_token .key } "
700700
701701 def test_schedule_list_anon_user_permitted (self ):
702- response = self .client .get ("/api/v2/schedule /" )
702+ response = self .client .get ("/api/v2/pipelines /" )
703703 self .assertEqual (response .status_code , status .HTTP_200_OK )
704704
705705 def test_schedule_retrieve_anon_user_permitted (self ):
706- response = self .client .get ("/api/v2/schedule /test_pipeline/" )
706+ response = self .client .get ("/api/v2/pipelines /test_pipeline/" )
707707 self .assertEqual (response .status_code , status .HTTP_200_OK )
708708
709709 @patch ("vulnerabilities.models.PipelineSchedule.create_new_job" )
710710 def test_create_schedule_anon_user_not_permitted (self , mock_create_new_job ):
711711 mock_create_new_job .return_value = "work-id2"
712712
713713 data = {"pipeline_id" : "test_pipeline2" }
714- response = self .client .post ("/api/v2/schedule /" , data , format = "json" )
714+ response = self .client .post ("/api/v2/pipelines /" , data , format = "json" )
715715
716716 self .assertNotEqual (response .status_code , status .HTTP_201_CREATED )
717717 self .assertEqual (response .status_code , status .HTTP_403_FORBIDDEN )
@@ -725,7 +725,7 @@ def test_create_schedule_with_staff_token_not_permitted(self, mock_create_new_jo
725725 mock_create_new_job .return_value = "work-id3"
726726
727727 data = {"pipeline_id" : "test_pipeline3" }
728- response = self .client .post ("/api/v2/schedule /" , data , format = "json" )
728+ response = self .client .post ("/api/v2/pipelines /" , data , format = "json" )
729729
730730 self .assertEqual (response .status_code , status .HTTP_403_FORBIDDEN )
731731 self .assertNotEqual (response .status_code , status .HTTP_201_CREATED )
@@ -737,7 +737,7 @@ def test_create_schedule_with_staff_session_permitted(self, mock_create_new_job)
737737 self .client .login (username = "admin_with_session" , password = "adminpassword" )
738738
739739 data = {"pipeline_id" : "test_pipeline3" }
740- response = self .client .post ("/api/v2/schedule /" , data , format = "json" )
740+ response = self .client .post ("/api/v2/pipelines /" , data , format = "json" )
741741
742742 self .assertNotEqual (response .status_code , status .HTTP_403_FORBIDDEN )
743743 self .assertEqual (response .status_code , status .HTTP_201_CREATED )
@@ -748,7 +748,7 @@ def test_schedule_update_anon_user_not_permitted(self, mock_create_new_job):
748748 mock_create_new_job .return_value = "work-id5"
749749
750750 data = {"run_interval" : 2 }
751- response = self .client .patch ("/api/v2/schedule /test_pipeline/" , data , format = "json" )
751+ response = self .client .patch ("/api/v2/pipelines /test_pipeline/" , data , format = "json" )
752752 self .schedule1 .refresh_from_db ()
753753
754754 self .assertNotEqual (response .status_code , status .HTTP_200_OK )
@@ -763,7 +763,7 @@ def test_schedule_update_with_staff_token_not_permitted(self, mock_create_new_jo
763763 mock_create_new_job .return_value = "work-id6"
764764
765765 data = {"run_interval" : 2 }
766- response = self .client .patch ("/api/v2/schedule /test_pipeline/" , data , format = "json" )
766+ response = self .client .patch ("/api/v2/pipelines /test_pipeline/" , data , format = "json" )
767767 self .schedule1 .refresh_from_db ()
768768
769769 self .assertNotEqual (response .status_code , status .HTTP_200_OK )
@@ -776,7 +776,7 @@ def test_schedule_update_with_staff_session_permitted(self, mock_create_new_job)
776776 self .client .login (username = "admin_with_session" , password = "adminpassword" )
777777
778778 data = {"run_interval" : 2 }
779- response = self .client .patch ("/api/v2/schedule /test_pipeline/" , data , format = "json" )
779+ response = self .client .patch ("/api/v2/pipelines /test_pipeline/" , data , format = "json" )
780780 self .schedule1 .refresh_from_db ()
781781
782782 self .assertEqual (response .status_code , status .HTTP_200_OK )
0 commit comments