Project done with some hardcoded string
This commit is contained in:
parent
7e929f3a32
commit
42409660a5
8 changed files with 810 additions and 0 deletions
26
test.py
Normal file
26
test.py
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
class MailTest:
|
||||
|
||||
def __init__(self, title, value=0, details=None):
|
||||
self._title = title
|
||||
self._value = value
|
||||
self._details = details
|
||||
|
||||
@property
|
||||
def title(self):
|
||||
return self._title
|
||||
|
||||
@property
|
||||
def value(self):
|
||||
return self._value
|
||||
|
||||
@property
|
||||
def valuestr(self):
|
||||
if self._value < -1: return " "
|
||||
elif self._value < 0: return "[ ] "
|
||||
elif self._value == 0: return "[ OK ] "
|
||||
elif self._value == 2: return "[WARN] "
|
||||
elif self._value == 1: return "[FAIL] "
|
||||
|
||||
@property
|
||||
def details(self):
|
||||
return self._details
|
||||
Reference in a new issue