def test_create_new(self): test.run_cmd(self.state, 'new', 'a') self.assertCount(1) data = self.state.get_all()[0] for key in ['ID', 'NAME', 'DESCRIPTION']: self.assertTrue(data.get(key))
def test_create_new_all(self): test.run_cmd(self.state, 'new', '--all', 'a') self.assertCount(1) data = self.state.get_all()[0] for key in [ 'ID', 'NAME', 'DESCRIPTION', 'STATUS', 'ASSIGNED', 'PRIORITY', 'LINK', 'PARENT', 'ESTIMATE', 'TIME-REPORT' ]: self.assertTrue(data.get(key))
def test_link_parent(self): test.add_data(self.state, a={}, b={'ID': 'beta'}) test.run_cmd(self.state, 'link', '-t', 'parent', 'a', 'b') self.assertHas('a', 'PARENT', 'beta b')
def test_link_link(self): test.add_data(self.state, a={}, b={'ID': 'beta'}) test.run_cmd(self.state, 'link', '-t', 'link', 'a', 'b') self.assertHas('a', 'LINK', 'beta b')
def test_link_multiple(self): test.add_data(self.state, a={}, b={'ID': 'beta'}, c={'ID': 'gamma'}) test.run_cmd(self.state, 'link', '-t', 'link', 'a', 'b', 'c') self.assertHas('a', 'LINK', 'beta b') self.assertHas('a', 'LINK', 'gamma c')
def test_create_new_multiple(self): test.run_cmd(self.state, 'new', 'a', 'b', 'c') self.assertCount(3)