From 40971208f24fe0377ce353c1acc8131b80c0decb Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Thu, 20 Oct 2011 11:04:41 +0200 Subject: [PATCH] add test for Explorer run_type_explorers Signed-off-by: Steven Armstrong --- lib/cdist/test/explorer/__init__.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/cdist/test/explorer/__init__.py b/lib/cdist/test/explorer/__init__.py index 6743ee26..1f7a2e35 100644 --- a/lib/cdist/test/explorer/__init__.py +++ b/lib/cdist/test/explorer/__init__.py @@ -124,3 +124,10 @@ class ExplorerClassTestCase(test.CdistTestCase): self.explorer.transfer_type_explorers(cdist_type) output = self.explorer.run_type_explorer('world', cdist_object) self.assertEqual(output, 'hello\n') + + def test_run_type_explorers(self): + cdist_type = core.Type(self.local.type_path, '__test_type') + cdist_object = core.Object(cdist_type, self.local.object_path, 'whatever') + cdist_object.create() + self.explorer.run_type_explorers(cdist_object) + self.assertEqual(cdist_object.explorers, {'world': 'hello'})