def test_scp_exception(self): scp = Scp(None) with pytest.raises(Exception) as inst: scp.init_app({}) assert str(inst.value) == "The OPENSSH_CONFIGURATION parameter was not found, it is required for openssh."