fail2ban/fail2ban-tests-nonet.patch
Orion Poplawski 673cc6fe14 Add upstream patch to fix setting loglevel in fail2ban.conf
Add upstream patches to fix tests in mock, run tests
2014-03-19 22:14:01 -06:00

20 lines
783 B
Diff

commit 175c5934620adb600fe4435732a3887855320669
Author: Steven Hiscocks <steven@hiscocks.me.uk>
Date: Wed Mar 19 19:30:48 2014 +0000
TST: Skip badips.py test is no network option set
diff --git a/fail2ban/tests/utils.py b/fail2ban/tests/utils.py
index 456a829..85c1d92 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])))