aboutsummaryrefslogtreecommitdiffstats
path: root/becommands/assign.py
diff options
context:
space:
mode:
Diffstat (limited to 'becommands/assign.py')
-rw-r--r--becommands/assign.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/becommands/assign.py b/becommands/assign.py
index ca8c647..8b80342 100644
--- a/becommands/assign.py
+++ b/becommands/assign.py
@@ -3,6 +3,24 @@ from libbe import bugdir, cmdutil, names
__desc__ = __doc__
def execute(args):
+ """
+ >>> from libbe import tests, names
+ >>> import os
+ >>> dir = tests.simple_bug_dir()
+ >>> os.chdir(dir.dir)
+ >>> dir.get_bug("a").assigned is None
+ True
+ >>> execute(("a",))
+ >>> dir.get_bug("a").assigned == names.creator()
+ True
+ >>> execute(("a", "someone"))
+ >>> dir.get_bug("a").assigned
+ 'someone'
+ >>> execute(("a","none"))
+ >>> dir.get_bug("a").assigned is None
+ True
+ >>> tests.clean_up()
+ """
assert(len(args) in (0, 1, 2))
if len(args) == 0:
print help()