tests.test_things3_kanban   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 17
dl 0
loc 33
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A Things3KanbanCase.close() 0 2 1
A Things3KanbanCase.test_today() 0 6 1
1
#!/usr/bin/env python3
2
# -*- coding: utf-8 -*-
3
4
"""Module documentation goes here."""
5
6
import unittest
7
import io
8
from things3 import things3_kanban
9
from things3.things3 import Things3
10
11
12
class Things3KanbanCase(unittest.TestCase):
13
    """Class documentation goes here."""
14
15
    things3 = Things3(database="resources/demo.sqlite3")
16
17
    class CustomStringIO(io.StringIO):
18
        """Do not close output for testing."""
19
20
        def close(self):
21
            pass
22
23
    def test_today(self):
24
        """Test Today."""
25
        output = self.CustomStringIO()
26
        things3_kanban.THINGS3 = self.things3
27
        things3_kanban.main(output)
28
        self.assertIn("Today MIT", output.getvalue())
29
30
31
if __name__ == "__main__":
32
    unittest.main()
33