def test_submodule(self): filename = puppet._checkfile_for_class("/puppet", "example::another") self.assertEqual(filename, "/puppet/modules/example/another/cabot-checks.ini")
def test_disallow_shenanigans(self): with self.assertRaises(Exception): puppet._checkfile_for_class("/puppet", "../fork")
def test_simple_name(self): filename = puppet._checkfile_for_class("/puppet", "example") self.assertEqual(filename, "/puppet/modules/example/cabot-checks.ini")