diff options
author | Jesse Jaggars <jjaggars@redhat.com> | 2012-02-23 13:27:11 -0600 |
---|---|---|
committer | Jesse Jaggars <jjaggars@redhat.com> | 2012-02-23 13:27:11 -0600 |
commit | 048ccc0f30357ec2dfc1ddae09a758960ca5c041 (patch) | |
tree | 4c9b27b99794e629f4ec8a54b54b2407733120bb /tests/policy_tests.py | |
parent | 69292ec4022534f6987f1d67d4aefb07a983c38d (diff) | |
download | sos-048ccc0f30357ec2dfc1ddae09a758960ca5c041.tar.gz |
adding more tests and fixing an error with tar archives
Diffstat (limited to 'tests/policy_tests.py')
-rw-r--r-- | tests/policy_tests.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/policy_tests.py b/tests/policy_tests.py index 1c192bdf..2654c82c 100644 --- a/tests/policy_tests.py +++ b/tests/policy_tests.py @@ -1,6 +1,6 @@ import unittest -from sos.policies import Policy +from sos.policies import Policy, import_policy from sos.plugins import Plugin, IndependentPlugin, RedHatPlugin, DebianPlugin class FauxPolicy(Policy): @@ -41,5 +41,11 @@ class PolicyTests(unittest.TestCase): self.assertFalse(p.validatePlugin(FauxDebianPlugin)) + def test_can_import(self): + self.assertTrue(import_policy('redhat') is not None) + + def test_cant_import(self): + self.assertTrue(import_policy('notreal') is None) + if __name__ == "__main__": unittest.main() |