From 52f9388f07ae4842e28e3935c45ea69c2feac543 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Fri, 7 Oct 2011 18:22:38 +0200 Subject: [PATCH] tests and fixtures for Type.is_install Signed-off-by: Steven Armstrong --- lib/cdist/test/type/fixtures/__install/install | 0 lib/cdist/test/type/fixtures/__not_install/.keep | 0 lib/cdist/test/type/test_type.py | 8 ++++++++ 3 files changed, 8 insertions(+) create mode 100644 lib/cdist/test/type/fixtures/__install/install create mode 100644 lib/cdist/test/type/fixtures/__not_install/.keep diff --git a/lib/cdist/test/type/fixtures/__install/install b/lib/cdist/test/type/fixtures/__install/install new file mode 100644 index 00000000..e69de29b diff --git a/lib/cdist/test/type/fixtures/__not_install/.keep b/lib/cdist/test/type/fixtures/__not_install/.keep new file mode 100644 index 00000000..e69de29b diff --git a/lib/cdist/test/type/test_type.py b/lib/cdist/test/type/test_type.py index de202b8b..ca62002a 100644 --- a/lib/cdist/test/type/test_type.py +++ b/lib/cdist/test/type/test_type.py @@ -51,7 +51,15 @@ class TypeTestCase(unittest.TestCase): cdist_type = cdist.core.Type(base_path, '__not_singleton') self.assertFalse(cdist_type.is_singleton) + def test_install_is_install(self): + base_path = fixtures + cdist_type = cdist.core.Type(base_path, '__install') + self.assertTrue(cdist_type.is_install) + def test_not_install_is_install(self): + base_path = fixtures + cdist_type = cdist.core.Type(base_path, '__not_install') + self.assertFalse(cdist_type.is_install) ''' suite = unittest.TestLoader().loadTestsFromTestCase(ObjectTestCase)