/__object_fq/__object_name/

Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
This commit is contained in:
Steven Armstrong 2011-10-19 15:15:05 +02:00
parent 9f21273f4e
commit b56925d24a
4 changed files with 9 additions and 6 deletions

View file

@ -85,7 +85,8 @@ class CodeTestCase(unittest.TestCase):
self.assertEqual(output_dict['__type'], self.cdist_type.absolute_path) self.assertEqual(output_dict['__type'], self.cdist_type.absolute_path)
self.assertEqual(output_dict['__object'], self.cdist_object.absolute_path) self.assertEqual(output_dict['__object'], self.cdist_object.absolute_path)
self.assertEqual(output_dict['__object_id'], self.cdist_object.object_id) self.assertEqual(output_dict['__object_id'], self.cdist_object.object_id)
self.assertEqual(output_dict['__object_fq'], self.cdist_object.path) self.assertEqual(output_dict['__object_name'], self.cdist_object.name)
self.assertEqual(output_dict['__self'], self.cdist_object.name)
def test_run_gencode_remote_environment(self): def test_run_gencode_remote_environment(self):
output_string = self.code.run_gencode_remote(self.cdist_object) output_string = self.code.run_gencode_remote(self.cdist_object)
@ -100,7 +101,8 @@ class CodeTestCase(unittest.TestCase):
self.assertEqual(output_dict['__type'], self.cdist_type.absolute_path) self.assertEqual(output_dict['__type'], self.cdist_type.absolute_path)
self.assertEqual(output_dict['__object'], self.cdist_object.absolute_path) self.assertEqual(output_dict['__object'], self.cdist_object.absolute_path)
self.assertEqual(output_dict['__object_id'], self.cdist_object.object_id) self.assertEqual(output_dict['__object_id'], self.cdist_object.object_id)
self.assertEqual(output_dict['__object_fq'], self.cdist_object.path) self.assertEqual(output_dict['__object_name'], self.cdist_object.name)
self.assertEqual(output_dict['__self'], self.cdist_object.name)
def test_transfer_code_remote(self): def test_transfer_code_remote(self):
self.cdist_object.code_remote = self.code.run_gencode_remote(self.cdist_object) self.cdist_object.code_remote = self.code.run_gencode_remote(self.cdist_object)

View file

@ -5,4 +5,5 @@ echo "echo __global: $__global"
echo "echo __type: $__type" echo "echo __type: $__type"
echo "echo __object: $__object" echo "echo __object: $__object"
echo "echo __object_id: $__object_id" echo "echo __object_id: $__object_id"
echo "echo __object_fq: $__object_fq" echo "echo __object_name: $__object_name"
echo "echo __self: $__self"

View file

@ -104,9 +104,9 @@ class ManifestTestCase(unittest.TestCase):
self.assertEqual(output_dict['__cdist_type_base_path'], self.local.type_path) self.assertEqual(output_dict['__cdist_type_base_path'], self.local.type_path)
self.assertEqual(output_dict['__type'], cdist_type.absolute_path) self.assertEqual(output_dict['__type'], cdist_type.absolute_path)
self.assertEqual(output_dict['__object'], cdist_object.absolute_path) self.assertEqual(output_dict['__object'], cdist_object.absolute_path)
self.assertEqual(output_dict['__self'], cdist_object.name)
self.assertEqual(output_dict['__object_id'], cdist_object.object_id) self.assertEqual(output_dict['__object_id'], cdist_object.object_id)
self.assertEqual(output_dict['__object_fq'], cdist_object.path) self.assertEqual(output_dict['__object_name'], cdist_object.name)
self.assertEqual(output_dict['__self'], cdist_object.name)
def test_debug_env_setup(self): def test_debug_env_setup(self):
self.log.setLevel(logging.DEBUG) self.log.setLevel(logging.DEBUG)

View file

@ -9,5 +9,5 @@ __type: $__type
__self: $__self __self: $__self
__object: $__object __object: $__object
__object_id: $__object_id __object_id: $__object_id
__object_fq: $__object_fq __object_name: $__object_name
DONE DONE