diff options
Diffstat (limited to 'cloudinit/tests/test_simpletable.py')
-rw-r--r-- | cloudinit/tests/test_simpletable.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/cloudinit/tests/test_simpletable.py b/cloudinit/tests/test_simpletable.py index 96bc24cf..a12a62a0 100644 --- a/cloudinit/tests/test_simpletable.py +++ b/cloudinit/tests/test_simpletable.py @@ -97,4 +97,10 @@ class TestSimpleTable(CiTestCase): table = SimpleTable(AUTHORIZED_KEYS_FIELDS) for row in AUTHORIZED_KEYS_ROWS: table.add_row(row) - self.assertEqual(str(table), AUTHORIZED_KEYS_TABLE) + + def test_get_string(self): + """get_string() method returns the same content as str().""" + table = SimpleTable(AUTHORIZED_KEYS_FIELDS) + for row in AUTHORIZED_KEYS_ROWS: + table.add_row(row) + self.assertEqual(table.get_string(), str(table)) |