libbe.command.status

class libbe.command.status.Status(*args, **kwargs)

Change a bug’s status level

>>> 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_bugdir(bd)
>>> cmd = Status(ui=ui)
>>> cmd._storage = bd.storage
>>> bd.bug_from_uuid('a').status
'open'
>>> ret = ui.run(cmd, args=['closed', '/a'])
>>> bd.flush_reload()
>>> bd.bug_from_uuid('a').status
'closed'
>>> ret = ui.run(cmd, args=['none', '/a'])
Traceback (most recent call last):
UserError: Invalid status level: none
>>> ui.cleanup()
>>> bd.cleanup()

Methods

cleanup()
complete([argument, fragment])
help(*args)
run([options, args])
usage()
name = 'status'

This Page