# vim: set filencoding=utf8 """ Test Suite for Command Line UI @author: Mike Crute (mcrute@ag.com) @organization: American Greetings Interactive @date: February 05, 2010 """ from nose.tools import assert_equals from kronos.cli import CommandLineUI from kronos.model import Activity class TestWhenParsingArgs(object): def setup(self): args = ['kronos', 'start', 'my action@home', '#stuff', '#good'] self.ui = CommandLineUI(args) self.ui.run() def test_should_identify_action(self): assert_equals(self.ui.action, 'start') def test_should_parse_action(self): assert isinstance(self.ui.activity, Activity) assert_equals(self.ui.activity.activity, 'my action') assert_equals(self.ui.activity.category, 'home')