mirror of
https://github.com/jtesta/ssh-audit.git
synced 2024-11-16 13:35:39 +01:00
Test Timeframe repr().
This commit is contained in:
parent
9c463b4e06
commit
96d442ec62
@ -119,9 +119,10 @@ class TestSSHAlgorithm(object):
|
||||
ov = "'OpenSSH': ['6.1', '6.6', '6.2', '7.1']"
|
||||
dv = "'Dropbear SSH': ['2016.72', '2016.73', '2016.72', '2016.74']"
|
||||
assert len(str(tf1)) == len(str(tf2)) == len(str(tf3))
|
||||
assert ov in str(tf1) and dv in str(tf1)
|
||||
assert ov in str(tf2) and dv in str(tf3)
|
||||
assert ov in str(tf2) and dv in str(tf3)
|
||||
assert ov in str(tf1) and ov in str(tf2) and ov in str(tf3)
|
||||
assert dv in str(tf1) and dv in str(tf2) and dv in str(tf3)
|
||||
assert ov in repr(tf1) and ov in repr(tf2) and ov in repr(tf3)
|
||||
assert dv in repr(tf1) and dv in repr(tf2) and dv in repr(tf3)
|
||||
|
||||
def test_timeframe_object(self):
|
||||
tf = self._tf(['6.1,6.2C', '6.6', '7.1'])
|
||||
@ -155,3 +156,9 @@ class TestSSHAlgorithm(object):
|
||||
assert tf.get_till('Dropbear SSH', True) == '2016.73'
|
||||
assert tf.get_from('Dropbear SSH', False) == '2016.72'
|
||||
assert tf.get_till('Dropbear SSH', False) == '2016.74'
|
||||
ov = "'OpenSSH': ['6.1', '6.6', '6.2', '7.1']"
|
||||
dv = "'Dropbear SSH': ['2016.72', '2016.73', '2016.72', '2016.74']"
|
||||
assert ov in str(tf)
|
||||
assert dv in str(tf)
|
||||
assert ov in repr(tf)
|
||||
assert dv in repr(tf)
|
||||
|
Loading…
Reference in New Issue
Block a user