diff --git a/tests/constantstests.py b/tests/constantstests.py index e6c7e73a..406812f7 100644 --- a/tests/constantstests.py +++ b/tests/constantstests.py @@ -35,4 +35,20 @@ class ContextTestCase(unittest.TestCase): # we achived our goal with this error. infact, this is a # ConstError but we can't catch it directly here pass + + def testConstValues(self): + constDict = { + "actions_file": "actions.py", + "setup_func": "setup", + "lib_dir_suffix": "/var/lib/pisi", + "metadata_xml": "metadata.xml" + } + + for k in constDict.keys(): + if hasattr(const, k): + value = getattr(const, k) + self.assertEqual(value, constDict[k]) + else: + self.fail("Constants does not have an attribute named %s" % k) + suite = unittest.makeSuite(ContextTestCase)