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/policy_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/policy_tests.py')
-rw-r--r-- | tests/policy_tests.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/policy_tests.py b/tests/policy_tests.py index 69cc0529..263ea352 100644 --- a/tests/policy_tests.py +++ b/tests/policy_tests.py @@ -8,20 +8,26 @@ import unittest from sos.policies import Policy, PackageManager, import_policy -from sos.report.plugins import Plugin, IndependentPlugin, RedHatPlugin, DebianPlugin +from sos.report.plugins import (Plugin, IndependentPlugin, + RedHatPlugin, DebianPlugin) + class FauxPolicy(Policy): distro = "Faux" + class FauxPlugin(Plugin, IndependentPlugin): pass + class FauxRedHatPlugin(Plugin, RedHatPlugin): pass + class FauxDebianPlugin(Plugin, DebianPlugin): pass + class PolicyTests(unittest.TestCase): def test_independent_only(self): @@ -67,11 +73,13 @@ class PackageManagerTests(unittest.TestCase): self.assertEquals(self.pm.all_pkgs_by_name('doesntmatter'), []) def test_default_all_pkgs_by_name_regex(self): - self.assertEquals(self.pm.all_pkgs_by_name_regex('.*doesntmatter$'), []) + self.assertEquals( + self.pm.all_pkgs_by_name_regex('.*doesntmatter$'), []) def test_default_pkg_by_name(self): self.assertEquals(self.pm.pkg_by_name('foo'), None) + if __name__ == "__main__": unittest.main() |