示例#1
0
def test_failed_command():
    c = Context()

    (client_info, _, _) = do('foo', [FailedCommand()], context=c)
    assert not client_info['success']
示例#2
0
def test_exception_command():
    c = Context()

    (client_info, _, _) = do('foo', [ExceptedCommand()], context=c)
    assert not client_info['success']
示例#3
0
def test_successful_command():
    c = Context()

    (client_info, _, _) = do('foo', [SuccessfulCommand()], context=c)
    assert client_info['success']
示例#4
0
 def initialize(self):
     Context.initialize(self)
     raise Exception("I suck too")
示例#5
0
 def __init__(self, *args, **kwargs):
     Context.__init__(self, *args, **kwargs)
示例#6
0
 def initialize(self):
     Context.initialize(self)
     raise Exception("I suck too")
示例#7
0
 def __init__(self, *args, **kwargs):
     Context.__init__(self, *args, **kwargs)