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

Method test_libssh_software

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

Source from the content-addressed store, hash-verified

157 assert repr(s) == '<Software(product=Dropbear SSH, version=2014.66, patch=agbn_1)>'
158
159 def test_libssh_software(self):
160 ps = lambda x: self.software.parse(self.banner.parse(x)) # noqa
161 # common
162 s = ps('SSH-2.0-libssh-0.2')
163 assert s.vendor is None
164 assert s.product == 'libssh'
165 assert s.version == '0.2'
166 assert s.patch is None
167 assert s.os is None
168 assert str(s) == 'libssh 0.2'
169 assert str(s) == s.display()
170 assert s.display(True) == str(s)
171 assert s.display(False) == str(s)
172 assert repr(s) == '<Software(product=libssh, version=0.2)>'
173 s = ps('SSH-2.0-libssh-0.7.4')
174 assert s.vendor is None
175 assert s.product == 'libssh'
176 assert s.version == '0.7.4'
177 assert s.patch is None
178 assert s.os is None
179 assert str(s) == 'libssh 0.7.4'
180 assert str(s) == s.display()
181 assert s.display(True) == str(s)
182 assert s.display(False) == str(s)
183 assert repr(s) == '<Software(product=libssh, version=0.7.4)>'
184
185 def test_romsshell_software(self):
186 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