test_status.py 582 Bytes
Newer Older
BO ZHANG's avatar
BO ZHANG committed
1
2
3
4
5
"""
Identifier:     tests/test_status.py
Name:           test_status.py
Description:    test CsstStatus
Author:         Bo Zhang
BO ZHANG's avatar
BO ZHANG committed
6
Created:        2022-10-04
BO ZHANG's avatar
BO ZHANG committed
7
Modified-History:
BO ZHANG's avatar
BO ZHANG committed
8
9
    2022-10-04, Bo Zhang, created, add CsstStatus test
    2023-12-10, Bo Zhang, rename class
BO ZHANG's avatar
BO ZHANG committed
10
"""
BO ZHANG's avatar
BO ZHANG committed
11
import unittest
BO ZHANG's avatar
BO ZHANG committed
12

BO ZHANG's avatar
BO ZHANG committed
13
14
15
from csst_common.status import CsstStatus


BO ZHANG's avatar
tweaks    
BO ZHANG committed
16
class TestCsstStatus(unittest.TestCase):
BO ZHANG's avatar
BO ZHANG committed
17
18
19
20
    def test_params(self):
        self.assertTrue(CsstStatus(0) == CsstStatus.PERFECT)
        self.assertTrue(CsstStatus(1) == CsstStatus.WARNING)
        self.assertTrue(CsstStatus(2) == CsstStatus.ERROR)