diff options
author | Aaron Bentley <abentley@panoramicfeedback.com> | 2005-03-24 16:10:44 +0000 |
---|---|---|
committer | Aaron Bentley <abentley@panoramicfeedback.com> | 2005-03-24 16:10:44 +0000 |
commit | 0e7c96a2fb5866f42c2c2ae7bccf47ae21f3b025 (patch) | |
tree | f7efea3296921fe21b6eb3bbb905f0771fbeff94 /becommands/assign.py | |
parent | 57d6ed2b544a1663657a9fcf29f5f089120e870e (diff) | |
download | bugseverywhere-0e7c96a2fb5866f42c2c2ae7bccf47ae21f3b025.tar.gz |
Added tests for assign
Diffstat (limited to 'becommands/assign.py')
-rw-r--r-- | becommands/assign.py | 18 |
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() |