diff options
author | Bryan Quigley <code@bryanquigley.com> | 2020-08-11 17:05:37 -0700 |
---|---|---|
committer | Jake Hunsaker <jhunsake@redhat.com> | 2020-08-13 10:14:16 -0400 |
commit | a80825dbb9e28306d9d2dac8114f00f03cce0c9a (patch) | |
tree | fe41aa8d78fdc91e6b058fe070ecac4556d63182 /tests/report_tests.py | |
parent | 1ec1bcc94f7e51fd934d851c215e6fddeb3102ad (diff) | |
download | sos-a80825dbb9e28306d9d2dac8114f00f03cce0c9a.tar.gz |
[travis,style] Upgrade to 20.04 and cover more in tests
Signed-off-by: Bryan Quigley <code@bryanquigley.com>
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
Diffstat (limited to 'tests/report_tests.py')
-rw-r--r-- | tests/report_tests.py | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/tests/report_tests.py b/tests/report_tests.py index 3418f16e..86d56e7e 100644 --- a/tests/report_tests.py +++ b/tests/report_tests.py @@ -13,8 +13,8 @@ try: except ImportError: import simplejson as json -from sos.report.reporting import (Report, Section, Command, CopiedFile, CreatedFile, - Alert, PlainTextReport) +from sos.report.reporting import (Report, Section, Command, CopiedFile, + CreatedFile, Alert, PlainTextReport) class ReportTest(unittest.TestCase): @@ -94,13 +94,13 @@ class TestPlainReport(unittest.TestCase): self.report.add(section1, section2) self.assertEquals(u''.join([ - self.pluglist.format(pluglist=" first second"), - self.div, - "\nfirst", - self.div, - "\nsecond" - ]), - PlainTextReport(self.report).unicode()) + self.pluglist.format(pluglist=" first second"), + self.div, + "\nfirst", + self.div, + "\nsecond" + ]), + PlainTextReport(self.report).unicode()) def test_command(self): cmd = Command(name="ls -al /foo/bar/baz", @@ -110,10 +110,10 @@ class TestPlainReport(unittest.TestCase): self.report.add(self.section) self.assertEquals(u''.join([ - self.defaultheader, - "- commands executed:\n * ls -al /foo/bar/baz" - ]), - PlainTextReport(self.report).unicode()) + self.defaultheader, + "- commands executed:\n * ls -al /foo/bar/baz" + ]), + PlainTextReport(self.report).unicode()) def test_copied_file(self): cf = CopiedFile(name="/etc/hosts", href="etc/hosts") @@ -121,10 +121,10 @@ class TestPlainReport(unittest.TestCase): self.report.add(self.section) self.assertEquals(u''.join([ - self.defaultheader, - "- files copied:\n * /etc/hosts" - ]), - PlainTextReport(self.report).unicode()) + self.defaultheader, + "- files copied:\n * /etc/hosts" + ]), + PlainTextReport(self.report).unicode()) def test_created_file(self): crf = CreatedFile(name="sample.txt", @@ -133,10 +133,10 @@ class TestPlainReport(unittest.TestCase): self.report.add(self.section) self.assertEquals(u''.join([ - self.defaultheader, - "- files created:\n * sample.txt" - ]), - PlainTextReport(self.report).unicode()) + self.defaultheader, + "- files created:\n * sample.txt" + ]), + PlainTextReport(self.report).unicode()) def test_alert(self): alrt = Alert("this is an alert") @@ -144,10 +144,10 @@ class TestPlainReport(unittest.TestCase): self.report.add(self.section) self.assertEquals(u''.join([ - self.defaultheader, - "- alerts:\n ! this is an alert" - ]), - PlainTextReport(self.report).unicode()) + self.defaultheader, + "- alerts:\n ! this is an alert" + ]), + PlainTextReport(self.report).unicode()) if __name__ == "__main__": |