| Total Complexity | 7 |
| Total Lines | 53 |
| Duplicated Lines | 0 % |
| Changes | 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 |