示例#1
0
def test_extract_output_should_contain_only_text(mock_subprocess, subprocess_config):
    result = pass_wrapper("something")
    assert ["something", "result"] == result
示例#2
0
def test_extract_output_should_split_by_split_newline(
    mock_subprocess, subprocess_config
):
    result = pass_wrapper("something")
    assert ["something", "result"] == result
示例#3
0
def test_wrapper_wrap_parameters_of_pass(mock_subprocess, subprocess_config):
    pass_wrapper("www.web.com", "-q")
    assert subprocess_config["args"] == ["pass", "www.web.com", "-q"]
示例#4
0
def test_wrapper_wrap_capture_output(mock_subprocess, subprocess_config):
    result = pass_wrapper("something")
    assert "stdout" in subprocess_config["kwargs"]
    assert subprocess_config["kwargs"]["stdout"] == subprocess.PIPE
    assert ["something_result"] == result
示例#5
0
def test_wrapper_wrapp_parameter_of_pass(mock_subprocess, subprocess_config):
    pass_wrapper("find")
    assert subprocess_config["args"] == ["pass", "find"]