@@ -51,7 +51,7 @@ def __init__(self, *args, **kwargs) -> None:
5151 self .__failures_json : JsonTestResults = []
5252 self .__errors_json : JsonTestResults = []
5353
54- def removePathFromId (self , path : str ) -> str :
54+ def get_name_from_id (self , path : str ) -> str :
5555 """Remove the full path of the unit test, keeping only its name."""
5656 path_match = self .__path_re .match (path )
5757
@@ -69,7 +69,7 @@ def addSuccess(self, test: unittest.TestCase) -> None:
6969
7070 self .__successes_json .append (
7171 JsonTestResult (
72- name = self .removePathFromId (test .id ()),
72+ name = self .get_name_from_id (test .id ()),
7373 time = round (1e6 * elapsed ),
7474 )
7575 )
@@ -78,25 +78,25 @@ def addSuccess(self, test: unittest.TestCase) -> None:
7878
7979 def addFailure (self , test : unittest .TestCase , err : Any ) -> None :
8080 self .__failures_json .append (
81- JsonTestResult (name = self .removePathFromId (test .id ()))
81+ JsonTestResult (name = self .get_name_from_id (test .id ()))
8282 )
8383
8484 super ().addFailure (test , err )
8585
8686 def addError (self , test : unittest .TestCase , err : Any ) -> None :
8787 self .__errors_json .append (
88- JsonTestResult (name = self .removePathFromId (test .id ()))
88+ JsonTestResult (name = self .get_name_from_id (test .id ()))
8989 )
9090
9191 super ().addError (test , err )
9292
93- def getSuccessesJSON (self ) -> JsonTestResults :
93+ def get_successes_json (self ) -> JsonTestResults :
9494 return self .__successes_json
9595
96- def getFailuresJSON (self ) -> JsonTestResults :
96+ def get_failures_json (self ) -> JsonTestResults :
9797 return self .__failures_json
9898
99- def getErrorsJSON (self ) -> JsonTestResults :
99+ def get_errors_json (self ) -> JsonTestResults :
100100 return self .__errors_json
101101
102102
@@ -111,9 +111,9 @@ def run(self, test) -> HealthcheckJsonTestResult:
111111
112112 return HealthcheckJsonTestResult (
113113 tests_passed = result .wasSuccessful (),
114- successes = result .getSuccessesJSON (),
115- failures = result .getFailuresJSON (),
116- errors = result .getErrorsJSON (),
114+ successes = result .get_successes_json (),
115+ failures = result .get_failures_json (),
116+ errors = result .get_errors_json (),
117117 )
118118
119119
0 commit comments