Пример #1
0
    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))
Пример #2
0
    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))
Пример #3
0
    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')
Пример #4
0
    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')
Пример #5
0
    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')
Пример #6
0
    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')
Пример #7
0
    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')
Пример #8
0
    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')
Пример #9
0
 def test_create_new_multiple(self):
     test.run_cmd(self.state, 'new', 'a', 'b', 'c')
     self.assertCount(3)