649
649
def test_short_header(self):
650
rows = TableOfClients(self.clients, self.keywords,
651
self.tablewords).rows()
656
self.assertEqual(rows, expected_rows)
650
text = str(TableOfClients(self.clients, self.keywords,
657
self.assertEqual(text, expected_text)
657
658
def test_booleans(self):
658
659
keywords = ["Bool", "NonDbusBoolean"]
659
rows = TableOfClients(self.clients, keywords,
660
self.tablewords).rows()
662
"A D-BUS Boolean A Non-D-BUS Boolean",
666
self.assertEqual(rows, expected_rows)
660
text = str(TableOfClients(self.clients, keywords,
663
A D-BUS Boolean A Non-D-BUS Boolean
667
self.assertEqual(text, expected_text)
667
668
def test_milliseconds_detection(self):
668
669
keywords = ["Integer", "Timeout", "Interval", "ApprovalDelay",
669
670
"ApprovalDuration", "ExtendedTimeout"]
670
rows = TableOfClients(self.clients, keywords,
671
self.tablewords).rows()
671
text = str(TableOfClients(self.clients, keywords,
673
674
An Integer Timedelta 1 Timedelta 2 Timedelta 3 Timedelta 4 Timedelta 5
674
675
0 00:00:00 00:00:01 00:00:02 00:00:03 00:00:04
675
676
1 1T02:03:05 1T02:03:06 1T02:03:07 1T02:03:08 1T02:03:09
678
self.assertEqual(rows, expected_rows)
678
self.assertEqual(text, expected_text)
679
679
def test_empty_and_long_string_values(self):
680
680
keywords = ["String"]
681
rows = TableOfClients(self.clients, keywords,
682
self.tablewords).rows()
681
text = str(TableOfClients(self.clients, keywords,
686
686
A huge string which will not fit,A huge string which will not fit,A huge string which will not fit,A huge string which will not fit,A huge string which will not fit,A huge string which will not fit,A huge string which will not fit,A huge string which will not fit,A huge string which will not fit,A huge string which will not fit,
689
self.assertEqual(rows, expected_rows)
688
self.assertEqual(text, expected_text)