mirror of
https://github.com/jtesta/ssh-audit.git
synced 2026-05-25 07:21:23 +02:00
pr307 update 1
This commit is contained in:
@@ -3,7 +3,7 @@ from ssh_audit.ssh_audit import process_commandline
|
||||
|
||||
|
||||
# pylint: disable=attribute-defined-outside-init
|
||||
class TestAuditConf:
|
||||
class TestHardeningGuides:
|
||||
@pytest.fixture(autouse=True)
|
||||
def init(self, ssh_audit):
|
||||
self.OutputBuffer = ssh_audit.OutputBuffer()
|
||||
@@ -12,11 +12,11 @@ class TestAuditConf:
|
||||
@staticmethod
|
||||
def _test_conf(conf, **kwargs):
|
||||
options = {
|
||||
'print_config': ''
|
||||
'get_hardening_guides': ''
|
||||
}
|
||||
for k, v in kwargs.items():
|
||||
options[k] = v
|
||||
assert conf.print_config == options['print_config']
|
||||
assert conf.get_hardening_guides == options['get_hardening_guides']
|
||||
|
||||
def test_printconfig_conf_process_commandline(self):
|
||||
# pylint: disable=too-many-statements
|
||||
@@ -24,7 +24,7 @@ class TestAuditConf:
|
||||
with pytest.raises(SystemExit):
|
||||
conf = c('')
|
||||
with pytest.raises(SystemExit):
|
||||
conf = c('--print-config')
|
||||
conf = c('--get-hardening-guides')
|
||||
self._test_conf(conf)
|
||||
|
||||
for vendor in ["Amazon", "Debian", "Rocky", "Mint", "Ubuntu", "NoOS"]:
|
||||
Reference in New Issue
Block a user