Passed
Push — master ( d52a5c...eb2b83 )
by Alexander
01:44
created

tests.test_things3.Things3Case.test_mit()   A

Complexity

Conditions 1

Size

Total Lines 4
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nop 1
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
#!/usr/bin/env python3
2
# -*- coding: utf-8 -*-
3
4
"""Module documentation goes here."""
5
6
import unittest
7
import os
8
from src.things3 import Things3
9
10
class Things3Case(unittest.TestCase):
11
    """Class documentation goes here."""
12
    
13
    things3 = Things3(database = 'tests/Things.sqlite3')
14
15
    def test_today(self):
16
        """Test Today."""
17
        tasks = self.things3.get_today()
18
        self.assertEqual(1, len(tasks), "foo")
19
20
    def test_inbox(self):
21
        """Test Inbox."""
22
        tasks = self.things3.get_inbox()
23
        self.assertEqual(1, len(tasks))
24
    
25
    def test_next(self):
26
        """Test Next."""
27
        tasks = self.things3.get_anytime()
28
        self.assertEqual(4, len(tasks))
29
30
    def test_backlog(self):
31
        """Test Backlog."""
32
        tasks = self.things3.get_someday()
33
        self.assertEqual(1, len(tasks))
34
    
35
    def test_upcoming(self):
36
        """Test Upcoming."""
37
        tasks = self.things3.get_upcoming()
38
        self.assertEqual(3, len(tasks))
39
    
40
    def test_waiting(self):
41
        """Test Waiting."""
42
        tasks = self.things3.get_waiting()
43
        self.assertEqual(1, len(tasks))
44
    
45
    def test_mit(self):
46
        """Test MIT."""
47
        tasks = self.things3.get_mit()
48
        self.assertEqual(0, len(tasks))
49
50
51
if __name__ == '__main__':
52
    unittest.main()
53