Assign an individual or group to fix a bug
>>> import sys
>>> import libbe.bugdir
>>> bd = libbe.bugdir.SimpleBugDir(memory=False)
>>> io = libbe.command.StringInputOutput()
>>> io.stdout = sys.stdout
>>> ui = libbe.command.UserInterface(io=io)
>>> ui.storage_callbacks.set_storage(bd.storage)
>>> cmd = Assign(ui=ui)
>>> bd.bug_from_uuid('a').assigned is None
True
>>> ui._user_id = u'François'
>>> ret = ui.run(cmd, args=['-', '/a'])
>>> bd.flush_reload()
>>> bd.bug_from_uuid('a').assigned
u'Fran\xe7ois'
>>> ret = ui.run(cmd, args=['someone', '/a', '/b'])
>>> bd.flush_reload()
>>> bd.bug_from_uuid('a').assigned
'someone'
>>> bd.bug_from_uuid('b').assigned
'someone'
>>> ret = ui.run(cmd, args=['none', '/a'])
>>> bd.flush_reload()
>>> bd.bug_from_uuid('a').assigned is None
True
>>> ui.cleanup()
>>> bd.cleanup()
Methods
cleanup() | |
complete([argument, fragment]) | |
help(*args) | |
run([options, args]) | |
usage() |