From 175c5934620adb600fe4435732a3887855320669 Mon Sep 17 00:00:00 2001 From: Steven Hiscocks Date: Wed, 19 Mar 2014 19:30:48 +0000 Subject: [PATCH] TST: Skip badips.py test is no network option set --- fail2ban/tests/utils.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fail2ban/tests/utils.py b/fail2ban/tests/utils.py index 456a829d..85c1d929 100644 --- a/fail2ban/tests/utils.py +++ b/fail2ban/tests/utils.py @@ -209,6 +209,9 @@ def gatherTests(regexps=None, no_network=False): for file_ in os.listdir( os.path.abspath(os.path.dirname(action_d.__file__))): if file_.startswith("test_") and file_.endswith(".py"): + if no_network and file_ in ['test_badips.py']: #pragma: no cover + # Test required network + continue tests.addTest(testloader.loadTestsFromName( "%s.%s" % (action_d.__name__, os.path.splitext(file_)[0])))