mirror of https://github.com/fail2ban/fail2ban
Merge pull request #1018 from opoplawski/no_network
Do not run smtp tests if no_network setpull/1029/head
commit
13d56af981
|
@ -153,7 +153,7 @@ def gatherTests(regexps=None, no_network=False):
|
||||||
for file_ in os.listdir(
|
for file_ in os.listdir(
|
||||||
os.path.abspath(os.path.dirname(action_d.__file__))):
|
os.path.abspath(os.path.dirname(action_d.__file__))):
|
||||||
if file_.startswith("test_") and file_.endswith(".py"):
|
if file_.startswith("test_") and file_.endswith(".py"):
|
||||||
if no_network and file_ in ['test_badips.py']: #pragma: no cover
|
if no_network and file_ in ['test_badips.py','test_smtp.py']: #pragma: no cover
|
||||||
# Test required network
|
# Test required network
|
||||||
continue
|
continue
|
||||||
tests.addTest(testloader.loadTestsFromName(
|
tests.addTest(testloader.loadTestsFromName(
|
||||||
|
|
Loading…
Reference in New Issue