Skip to content

Commit

Permalink
Test Timeframe repr().
Browse files Browse the repository at this point in the history
  • Loading branch information
arthepsy committed Apr 11, 2017
1 parent 9c463b4 commit 96d442e
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions test/test_ssh_algorithm.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,10 @@ def cmp_tf(v, s, r):
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'])
Expand Down Expand Up @@ -155,3 +156,9 @@ def test_timeframe_object(self):
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)

0 comments on commit 96d442e

Please sign in to comment.