#NEWLINE# @ mock . patch ( 'rally.common.objects.deploy.db.deployment_update' ) #NEWLINE# @ mock . patch ( 'rally.common.objects.deploy.db.deployment_get' ) #NEWLINE# def test_recreate( self , mock_deployment_get , mock_deployment_update ) : #NEWLINE# #INDENT# mock_deployment_get . return_value = self . deployment #NEWLINE# mock_deployment_update . return_value = mock_deployment_update . deployment #NEWLINE# api . Deployment . recreate ( self . deployment_uuid ) #NEWLINE# mock_deployment_get . assert_called_once_with ( self . deployment_uuid ) #NEWLINE# mock_deployment_update . assert_has_calls ( [ mock . call ( self . deployment_uuid , self . credentials ) ] )