@@ -228,15 +228,15 @@ def test_should_send_proper_data_and_print_message_when_deployments_start_was_us
228228 assert result .exit_code == 0
229229
230230
231- class TestDeleteDeployment (object ):
231+ class TestStopDeployment (object ):
232232 URL = "https://api.paperspace.io/deployments/updateDeployment/"
233- COMMAND = ["deployments" , "delete " ,
233+ COMMAND = ["deployments" , "stop " ,
234234 "--id" , "some_id" ]
235- REQUEST_JSON = {"upd " : { "isDeleted" : True } , "id" : u"some_id" }
236- EXPECTED_STDOUT = "Deployment deleted. \n "
235+ REQUEST_JSON = {"isRunning " : False , "id" : u"some_id" }
236+ EXPECTED_STDOUT = "Deployment stopped \n "
237237
238238 COMMAND_WITH_API_KEY = [
239- "deployments" , "delete " ,
239+ "deployments" , "stop " ,
240240 "--id" , "some_id" ,
241241 "--apiKey" , "some_key" ,
242242 ]
@@ -247,7 +247,7 @@ class TestDeleteDeployment(object):
247247 EXPECTED_STDOUT_WITH_WRONG_ID = "Unable to access deployment\n "
248248
249249 @mock .patch ("paperspace.cli.deployments.deployments_commands.client.requests.post" )
250- def test_should_send_proper_data_and_print_message_when_deployments_delete_was_used (self , post_patched ):
250+ def test_should_send_proper_data_and_print_message_when_deployments_stop_was_used (self , post_patched ):
251251 post_patched .return_value = MockResponse (status_code = 204 )
252252
253253 runner = CliRunner ()
@@ -277,7 +277,7 @@ def test_should_send_proper_data_with_custom_api_key_when_api_key_parameter_was_
277277 assert result .exit_code == 0
278278
279279 @mock .patch ("paperspace.cli.deployments.deployments_commands.client.requests.post" )
280- def test_should_send_proper_data_and_print_message_when_deployments_delete_used_with_wrong_id (self , post_patched ):
280+ def test_should_send_proper_data_and_print_message_when_deployments_stop_used_with_wrong_id (self , post_patched ):
281281 post_patched .return_value = MockResponse (self .RESPONSE_JSON_400 , 400 , "fake content" )
282282
283283 runner = CliRunner ()
0 commit comments