Loading doc/analysis/checks.py +13 −0 Original line number Original line Diff line number Diff line Loading @@ -58,6 +58,8 @@ class Checks: Checks.check_response_body_title_when_using_session_request, Checks.check_response_body_title_when_using_session_request, 'Check Response Body Containing ProblemDetails Element Containing Title Element': 'Check Response Body Containing ProblemDetails Element Containing Title Element': Checks.check_response_body_containing_problemdetails_element_containing_title_element, Checks.check_response_body_containing_problemdetails_element_containing_title_element, 'Check Dictionary Might Contain Additional Members': Checks.check_dictionary_might_contain_additional_members, 'Check Response Body Containing ProblemDetails Element': 'Check Response Body Containing ProblemDetails Element': Checks.check_response_body_containing_problemdetails_element, Checks.check_response_body_containing_problemdetails_element, 'Check RL Response Body Containing ProblemDetails Element Containing Type Element set to': 'Check RL Response Body Containing ProblemDetails Element Containing Type Element set to': Loading Loading @@ -137,6 +139,10 @@ class Checks: 'params': ['response_body'], 'params': ['response_body'], 'position': [0] 'position': [0] }, }, 'Check Dictionary Might Contain Additional Members': { 'params': ['dictionary', 'key'], 'position': [0, 1] }, 'Check Response Headers Containing URI set to': { 'Check Response Headers Containing URI set to': { 'params': ['expected_entity_id', 'response_headers'], 'params': ['expected_entity_id', 'response_headers'], 'position': [0, 1] 'position': [0, 1] Loading Loading @@ -443,6 +449,13 @@ class Checks: def check_response_headers_id_not_empty(kwargs: list) -> str: def check_response_headers_id_not_empty(kwargs: list) -> str: return 'Response Header: Location is not Empty' return 'Response Header: Location is not Empty' @staticmethod def check_dictionary_might_contain_additional_members(kwargs: list) -> str: if 'dictionary' in kwargs and 'key' in kwargs: return f"The dictionary `{kwargs['dictionary']}' might contain the key '{kwargs['key']}'" else: raise Exception(f"ERROR, Expected 'dictionary' and 'key' parameters but received: {kwargs}") @staticmethod @staticmethod def check_response_body_containing_an_attribute_set_to(kwargs: list) -> str: def check_response_body_containing_an_attribute_set_to(kwargs: list) -> str: expected_parameters = ['checks', 'expected_attribute_name', 'response_body', 'expected_attribute_value'] expected_parameters = ['checks', 'expected_attribute_name', 'response_body', 'expected_attribute_value'] Loading doc/analysis/generaterobotdata.py +1 −1 Original line number Original line Diff line number Diff line Loading @@ -560,7 +560,7 @@ class GenerateRobotData: # pics = f'PICS_{tags[0]}' # pics = f'PICS_{tags[0]}' # # # return reference, pics # return reference, pics aux = [x for x in tags if match(pattern=r'^(\d+_\d+_\d+)', string=x)] aux = [x for x in tags if match(pattern=r'^(\d+_\d+_\d+)|^(\d+_\d+)', string=x)] if len(aux) == 0: if len(aux) == 0: raise Exception( raise Exception( Loading Loading
doc/analysis/checks.py +13 −0 Original line number Original line Diff line number Diff line Loading @@ -58,6 +58,8 @@ class Checks: Checks.check_response_body_title_when_using_session_request, Checks.check_response_body_title_when_using_session_request, 'Check Response Body Containing ProblemDetails Element Containing Title Element': 'Check Response Body Containing ProblemDetails Element Containing Title Element': Checks.check_response_body_containing_problemdetails_element_containing_title_element, Checks.check_response_body_containing_problemdetails_element_containing_title_element, 'Check Dictionary Might Contain Additional Members': Checks.check_dictionary_might_contain_additional_members, 'Check Response Body Containing ProblemDetails Element': 'Check Response Body Containing ProblemDetails Element': Checks.check_response_body_containing_problemdetails_element, Checks.check_response_body_containing_problemdetails_element, 'Check RL Response Body Containing ProblemDetails Element Containing Type Element set to': 'Check RL Response Body Containing ProblemDetails Element Containing Type Element set to': Loading Loading @@ -137,6 +139,10 @@ class Checks: 'params': ['response_body'], 'params': ['response_body'], 'position': [0] 'position': [0] }, }, 'Check Dictionary Might Contain Additional Members': { 'params': ['dictionary', 'key'], 'position': [0, 1] }, 'Check Response Headers Containing URI set to': { 'Check Response Headers Containing URI set to': { 'params': ['expected_entity_id', 'response_headers'], 'params': ['expected_entity_id', 'response_headers'], 'position': [0, 1] 'position': [0, 1] Loading Loading @@ -443,6 +449,13 @@ class Checks: def check_response_headers_id_not_empty(kwargs: list) -> str: def check_response_headers_id_not_empty(kwargs: list) -> str: return 'Response Header: Location is not Empty' return 'Response Header: Location is not Empty' @staticmethod def check_dictionary_might_contain_additional_members(kwargs: list) -> str: if 'dictionary' in kwargs and 'key' in kwargs: return f"The dictionary `{kwargs['dictionary']}' might contain the key '{kwargs['key']}'" else: raise Exception(f"ERROR, Expected 'dictionary' and 'key' parameters but received: {kwargs}") @staticmethod @staticmethod def check_response_body_containing_an_attribute_set_to(kwargs: list) -> str: def check_response_body_containing_an_attribute_set_to(kwargs: list) -> str: expected_parameters = ['checks', 'expected_attribute_name', 'response_body', 'expected_attribute_value'] expected_parameters = ['checks', 'expected_attribute_name', 'response_body', 'expected_attribute_value'] Loading
doc/analysis/generaterobotdata.py +1 −1 Original line number Original line Diff line number Diff line Loading @@ -560,7 +560,7 @@ class GenerateRobotData: # pics = f'PICS_{tags[0]}' # pics = f'PICS_{tags[0]}' # # # return reference, pics # return reference, pics aux = [x for x in tags if match(pattern=r'^(\d+_\d+_\d+)', string=x)] aux = [x for x in tags if match(pattern=r'^(\d+_\d+_\d+)|^(\d+_\d+)', string=x)] if len(aux) == 0: if len(aux) == 0: raise Exception( raise Exception( Loading