commit e0f5e40ee037fef024d4c0200eed607ea07f469c
parent c7866af91e293332f7b1c0bb28039b26cfb2e3ee
Author: lash <dev@holbrook.no>
Date: Sun, 6 Nov 2022 15:05:32 +0000
Add all jumps
Diffstat:
2 files changed, 28 insertions(+), 3 deletions(-)
diff --git a/piknik/basket.py b/piknik/basket.py
@@ -42,6 +42,18 @@ class Basket:
self.state.move(issue_id, self.state.DOING)
+ def review(self, issue_id):
+ self.state.move(issue_id, self.state.REVIEW)
+
+
+ def backlog(self, issue_id):
+ self.state.move(issue_id, self.state.BACKLOG)
+
+
+ def finish(self, issue_id):
+ self.state.move(issue_id, self.state.BACKLOG)
+
+
def advance(self, issue_id):
if self.state.state(issue_id) & self.limit > 0:
raise DeadIssue(issue_id)
diff --git a/test/test_basic.py b/test/test_basic.py
@@ -54,11 +54,11 @@ class TestBasic(unittest.TestCase):
self.b.advance(o.id)
- def test_jump(self):
+ def test_list_jump(self):
o = Issue('The first issue')
self.b.add(o)
- o = Issue('The second issue')
- self.b.add(o)
+ o_two = Issue('The second issue')
+ self.b.add(o_two)
self.b.doing(o.id)
r = self.b.list('backlog')
@@ -68,6 +68,19 @@ class TestBasic(unittest.TestCase):
self.assertEqual(len(r), 1)
+ def test_jump(self):
+ o = Issue('The first issue')
+ self.b.add(o)
+ self.b.doing(o.id)
+ r = self.b.list('doing')
+ self.b.review(o.id)
+ r = self.b.list('review')
+ self.b.backlog(o.id)
+ r = self.b.list('backlog')
+ self.b.finish(o.id)
+ r = self.b.list('finished')
+
+
def test_magic_unblock(self):
o = Issue('The first issue')
self.b.add(o)