From 5055afe0c08f67cf1bf484016b2c4a415a6b87bb Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Thu, 13 Oct 2011 14:57:09 +0200 Subject: [PATCH] test for test_transfer_code_remote Signed-off-by: Steven Armstrong --- lib/cdist/test/code/__init__.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/cdist/test/code/__init__.py b/lib/cdist/test/code/__init__.py index 0c35e09a..be4530d8 100644 --- a/lib/cdist/test/code/__init__.py +++ b/lib/cdist/test/code/__init__.py @@ -63,6 +63,7 @@ class ExplorerClassTestCase(unittest.TestCase): self.cdist_type = core.Type(self.local.type_path, '__dump_environment') self.cdist_object = core.Object(self.cdist_type, self.local.object_path, 'whatever') + self.cdist_object.create() def tearDown(self): shutil.rmtree(self.out_path) @@ -98,6 +99,12 @@ class ExplorerClassTestCase(unittest.TestCase): self.assertEqual(output_dict['__object_id'], self.cdist_object.object_id) self.assertEqual(output_dict['__object_fq'], self.cdist_object.path) + def test_transfer_code_remote(self): + self.cdist_object.code_remote = self.code.run_gencode_remote(self.cdist_object) + self.code.transfer_code_remote(self.cdist_object) + destination = os.path.join(self.remote.object_path, self.cdist_object.code_remote_path) + self.assertTrue(os.path.isfile(destination)) + '''