MCPcopy
hub / github.com/jtesta/ssh-audit / test_cisco_software

Method test_cisco_software

test/test_software.py:215–228  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

213 assert repr(s) == '<Software(vendor=HP, product=iLO (Integrated Lights-Out) sshd, version=0.2.1)>'
214
215 def test_cisco_software(self):
216 ps = lambda x: self.software.parse(self.banner.parse(x)) # noqa
217 # common
218 s = ps('SSH-1.5-Cisco-1.25')
219 assert s.vendor == 'Cisco'
220 assert s.product == 'IOS/PIX sshd'
221 assert s.version == '1.25'
222 assert s.patch is None
223 assert s.os is None
224 assert str(s) == 'Cisco IOS/PIX sshd 1.25'
225 assert str(s) == s.display()
226 assert s.display(True) == str(s)
227 assert s.display(False) == str(s)
228 assert repr(s) == '<Software(vendor=Cisco, product=IOS/PIX sshd, version=1.25)>'
229
230 def test_software_os(self):
231 ps = lambda x: self.software.parse(self.banner.parse(x)) # noqa

Callers

nothing calls this directly

Calls 2

displayMethod · 0.80
parseMethod · 0.45

Tested by

no test coverage detected