Example #1
0
def test_command_initd(sudo, exists):
    (exists
        .expects_call()
            .returns(False)
        .next_call()
            .with_args("/etc/init.d/foo")
            .returns(True))
    sudo.expects_call().with_args("/etc/init.d/foo method")
    service.command("foo", "method")
Example #2
0
def test_command_initd(sudo, exists):
    (exists
        .expects_call()
        .returns(False)
        .next_call()
        .with_args("/etc/init.d/foo")
        .returns(True))
    sudo.expects_call().with_args("/etc/init.d/foo method")
    service.command("foo", "method")
Example #3
0
def test_command_upstart(sudo, exists):
    exists.expects_call().with_args("/etc/init/foo.conf").returns(True)
    sudo.expects_call().with_args("method foo")
    service.command("foo", "method")
Example #4
0
def test_command_upstart(sudo, exists):
    exists.expects_call().with_args("/etc/init/foo.conf").returns(True)
    sudo.expects_call().with_args("method foo")
    service.command("foo", "method")