def test_extract_output_should_contain_only_text(mock_subprocess, subprocess_config): result = pass_wrapper("something") assert ["something", "result"] == result
def test_extract_output_should_split_by_split_newline( mock_subprocess, subprocess_config ): result = pass_wrapper("something") assert ["something", "result"] == result
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"]
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
def test_wrapper_wrapp_parameter_of_pass(mock_subprocess, subprocess_config): pass_wrapper("find") assert subprocess_config["args"] == ["pass", "find"]