summaryrefslogtreecommitdiff
path: root/kronos/tests/test_cli.py
diff options
context:
space:
mode:
Diffstat (limited to 'kronos/tests/test_cli.py')
-rw-r--r--kronos/tests/test_cli.py29
1 files changed, 29 insertions, 0 deletions
diff --git a/kronos/tests/test_cli.py b/kronos/tests/test_cli.py
new file mode 100644
index 0000000..c3b8e4d
--- /dev/null
+++ b/kronos/tests/test_cli.py
@@ -0,0 +1,29 @@
1# vim: set filencoding=utf8
2"""
3Test Suite for Command Line UI
4
5@author: Mike Crute (mcrute@ag.com)
6@organization: American Greetings Interactive
7@date: February 05, 2010
8"""
9
10
11from nose.tools import assert_equals
12from kronos.cli import CommandLineUI
13from kronos.model import Activity
14
15
16class TestWhenParsingArgs(object):
17
18 def setup(self):
19 args = ['kronos', 'start', 'my action@home', '#stuff', '#good']
20 self.ui = CommandLineUI(args)
21 self.ui.run()
22
23 def test_should_identify_action(self):
24 assert_equals(self.ui.action, 'start')
25
26 def test_should_parse_action(self):
27 assert isinstance(self.ui.activity, Activity)
28 assert_equals(self.ui.activity.activity, 'my action')
29 assert_equals(self.ui.activity.category, 'home')