diff options
author | Aaron Bentley <aaron.bentley@utoronto.ca> | 2005-03-24 13:05:44 +0000 |
---|---|---|
committer | Aaron Bentley <aaron.bentley@utoronto.ca> | 2005-03-24 13:05:44 +0000 |
commit | e150af60e2331fbacbd2de1bcfd572b7cf73c802 (patch) | |
tree | a3c320ffa77ccfcef212c11bf860bf77f03716aa /becommands | |
parent | 7bbb8105c144eaca2299bd22b4063af6b54ef1a3 (diff) | |
download | bugseverywhere-e150af60e2331fbacbd2de1bcfd572b7cf73c802.tar.gz |
Finished tests for new
Diffstat (limited to 'becommands')
-rw-r--r-- | becommands/new.py | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/becommands/new.py b/becommands/new.py index 01acf96..47221a7 100644 --- a/becommands/new.py +++ b/becommands/new.py @@ -1,13 +1,24 @@ """Create a new bug""" -from libbe import bugdir, cmdutil, names, utility, tests +from libbe import bugdir, cmdutil, names, utility def execute(args): """ - >>> import os + >>> import os, time + >>> from libbe import tests >>> dir = tests.bug_arch_dir() >>> os.chdir(dir.dir) >>> names.uuid = lambda: "a" >>> execute (("this is a test",)) Created bug with ID a + >>> bug = list(dir.list())[0] + >>> bug.summary + 'this is a test' + >>> bug.creator = os.environ["LOGNAME"] + >>> bug.time <= int(time.time()) + True + >>> bug.severity + 'minor' + >>> bug.target == None + True >>> tests.clean_up() """ if len(args) != 1: |