From a252d308dd1ae804b226d8fe41da93402f1e5259 Mon Sep 17 00:00:00 2001 From: Bastian Kleineidam Date: Sat, 28 Feb 2009 13:06:44 +0100 Subject: [PATCH] Added proxy resource test --- tests/__init__.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tests/__init__.py b/tests/__init__.py index 680501bc..5718b9eb 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -89,5 +89,15 @@ def has_clamav (): return False +@memoized +def has_proxy (): + try: + cmd = ["waitfor", "-w", "1", "port:localhost:8081"] + return subprocess.call(cmd) == 0 + except OSError: + pass + return False + + if __name__ == '__main__': - print has_clamav(), has_network(), has_msgfmt(), has_posix() + print has_clamav(), has_network(), has_msgfmt(), has_posix(), has_proxy()