assert out != None, 'Function get_data_extraction_in_progress_trainingjobs has failed'
- def test_get_data_extraction_in_progress_trainingjobs(self):
+ def test_negative_get_data_extraction_in_progress_trainingjobs(self):
checker = Check()
try:
db_obj = db_helper([["usecase_name", "steps_state"]], raise_exception=True, check_success_obj=checker)
out = get_data_extraction_in_progress_trainingjobs(db_obj)
assert out != None, 'Fxn get_usecases_which_has_data_extraction_in_progress Failed'
except Exception as err:
- assert str(err) == "bad operand type for unary +: 'str'", 'Negative test get_usecases_which_has_data_extraction_in_progress FAILED, Doesnt returned required error'
+ assert str(err) == "Failed to execute query in get_data_extraction_in_progress_trainingjobs,DB Error", 'Negative test get_usecases_which_has_data_extraction_in_progress FAILED, Doesnt returned required error'
assert checker.finished, 'Cursor Not Closed Properly for fxn test_negative_get_usecases_which_has_data_extraction_in_progress'
def test_change_field_of_latest_version(self):
assert checker.finished, 'change_in_progress_to_failed_by_latest_version FAILED'
except Exception as err:
fxn_name = "change_in_progress_to_failed_by_latest_version("
- assert str(err) == "bad operand type for unary +: 'str'", 'Negative test {} FAILED, Doesnt returned required error'.format(fxn_name)
+ assert str(err) == "Failed to execute query in change_in_progress_to_failed_by_latest_versionDB Error", 'Negative test {} FAILED, Doesnt returned required error'.format(fxn_name)
assert checker.finished, 'Cursor Not Closed Properly for fxn {} | Negative Test'.format(fxn_name)
def test_change_steps_state_of_latest_version(self):
import json
import requests
+str_ing = 'http://'
def data_extraction_start(training_config_obj, trainingjob_name, feature_list, query_filter,
datalake_source, _measurement, bucket):
"""
logger.debug('training manager is calling data extraction for '+trainingjob_name)
data_extraction_ip = training_config_obj.data_extraction_ip
data_extraction_port = training_config_obj.data_extraction_port
- url = 'http://'+str(data_extraction_ip)+':'+str(data_extraction_port)+'/feature-groups'
+ url = str_ing+str(data_extraction_ip)+':'+str(data_extraction_port)+'/feature-groups'
logger.debug(url)
source = {}
logger.debug('training manager is calling data extraction for '+trainingjob_name)
data_extraction_ip = training_config_obj.data_extraction_ip
data_extraction_port = training_config_obj.data_extraction_port
- url = 'http://'+str(data_extraction_ip)+':'+str(data_extraction_port)+\
+ url = str_ing+str(data_extraction_ip)+':'+str(data_extraction_port)+\
'/task-status/'+trainingjob_name
logger.debug(url)
response = requests.get(url)
logger.debug('training manager will send to kf_adapter: '+json.dumps(dict_data))
kf_adapter_ip = training_config_obj.kf_adapter_ip
kf_adapter_port = training_config_obj.kf_adapter_port
- url = 'http://'+str(kf_adapter_ip)+':'+str(kf_adapter_port)+\
+ url = str_ing+str(kf_adapter_ip)+':'+str(kf_adapter_port)+\
'/trainingjobs/' + trainingjob_name + '/execution'
logger.debug(url)
response = requests.post(url,
All exception are provided with exception message and HTTP status code.
"""
api_response = {}
- #response_code = status.HTTP_500_INTERNAL_SERVER_ERROR
response_code = status.HTTP_500_INTERNAL_SERVER_ERROR
LOGGER.debug("Training job create/update request(trainingjob name %s) ", trainingjob_name )
try: