Update and rename test_class.py to test_template.py

This commit is contained in:
Maximilien Rigaut 2022-06-22 15:41:48 +02:00 committed by GitHub
parent fe1a7c999d
commit 78d262dafc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 3 deletions

View File

@ -1,4 +1,4 @@
class Test:
class TestTemplate:
def __init__(self, args, agnpath, test_data):
"""
Simple test template.
@ -39,12 +39,13 @@ class Test:
"""
return self.status
def get_status_from_code(self):
@static
def get_status_from_code(code):
"""
:return: Description of the status code
:rtype: str
"""
return self.return_code_dict[self.status_code]
return self.return_code_dict[code]
def set_status(self, statuscode: int):
"""
@ -55,4 +56,5 @@ class Test:
:rtype: int
"""
self.status_code = statuscode
self.status = self.get_status_from_code(statuscode)
return self.status_code