def __init__(self): Cmd.__init__(self) TaskCmd.__init__(self) ProjectCmd.__init__(self) KeywordCmd.__init__(self) BugCmd.__init__(self) AliasCmd.__init__(self) self.prompt = "yokadi> " self.historyPath=os.path.expandvars("$HOME/.yokadi_history") self.loadHistory()
class BugTestCase(unittest.TestCase): def setUp(self): testutils.clearDatabase() tui.clearInputAnswers() self.cmd = BugCmd() def testAdd(self): tui.addInputAnswers("y", "2", "4", "123") self.cmd.do_bug_add("x t1") tasks = list(Task.select()) result = [x.title for x in tasks] expected = [u"t1"] self.assertEqual(result, expected) kwDict = Task.get(1).getKeywordDict() self.assertEqual(kwDict, dict(_severity=2, _likelihood=4, _bug=123))
def setUp(self): testutils.clearDatabase() tui.clearInputAnswers() self.cmd = BugCmd()