From 96d442ec6291f9ba4b21514e05648bbd6e7a05c7 Mon Sep 17 00:00:00 2001 From: Andris Raugulis Date: Tue, 11 Apr 2017 13:32:38 +0300 Subject: [PATCH] Test Timeframe repr(). --- test/test_ssh_algorithm.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/test/test_ssh_algorithm.py b/test/test_ssh_algorithm.py index 5ba88e5..5e03529 100644 --- a/test/test_ssh_algorithm.py +++ b/test/test_ssh_algorithm.py @@ -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)