From 5d59102018419e4a78774d3c7e0c9e26ba1eb83d Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Fri, 7 Oct 2011 22:50:11 +0200 Subject: [PATCH] test only one instance of same type Signed-off-by: Steven Armstrong --- lib/cdist/test/type/test_type.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/cdist/test/type/test_type.py b/lib/cdist/test/type/test_type.py index 140e5349..1c8d10aa 100644 --- a/lib/cdist/test/type/test_type.py +++ b/lib/cdist/test/type/test_type.py @@ -32,6 +32,12 @@ fixtures = op.join(my_dir, 'fixtures') class TypeTestCase(unittest.TestCase): + def test_only_one_instance(self): + base_path = fixtures + cdist_type1 = cdist.core.Type(base_path, '__name_path') + cdist_type2 = cdist.core.Type(base_path, '__name_path') + self.assertEqual(id(cdist_type1), id(cdist_type2)) + def test_name(self): base_path = fixtures cdist_type = cdist.core.Type(base_path, '__name_path')