예제 #1
0
def test_plugin_execute():
    plugin = Plugin(MagicMock(), {}, 'shellexec')
    assert plugin.execute('echo foo') == 0
예제 #2
0
def test_plugin_execute_raises():
    plugin = Plugin(MagicMock(), {}, 'shellexec')
    with pytest.raises(RuntimeError) as error:
        plugin.execute('echo "foo')
        assert 'Subprocess returned 2' in error.message
예제 #3
0
def test_plugin_execute_raises():
    plugin = Plugin(None, {})
    with pytest.raises(RuntimeError) as error:
        plugin.execute('echo "foo')
        assert 'Subprocess returned 2' in error.message
예제 #4
0
def test_plugin_execute():
    plugin = Plugin(None, {})
    assert plugin.execute('echo foo') == 0
def test_plugin_execute_raises():
    plugin = Plugin(None, {}, None)
    with pytest.raises(RuntimeError) as error:
        plugin.execute('echo "foo')
        assert 'Subprocess returned 2' in error.message
def test_plugin_execute():
    plugin = Plugin(None, {}, None)
    assert plugin.execute('echo foo') == 0