Total Complexity | 2 |
Total Lines | 18 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | '''test miner api''' |
||
2 | import unittest |
||
3 | from helpers.antminerhelper import MinerMonitorException |
||
4 | |||
5 | class TestException(unittest.TestCase): |
||
6 | def test_exception_is_timed_out(self): |
||
7 | '''test''' |
||
8 | ex = MinerMonitorException('monitor timed out') |
||
9 | self.assertTrue(ex.istimedout()) |
||
10 | |||
11 | def test_exception_is_not_timed_out(self): |
||
12 | '''test''' |
||
13 | ex = MinerMonitorException('this is not the error you are looking for') |
||
14 | self.assertFalse(ex.istimedout()) |
||
15 | |||
16 | if __name__ == '__main__': |
||
17 | unittest.main() |
||
18 |