From 28bf0c3ed8f8bcee36caa07839b8163986d29872 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 6 Nov 2012 21:52:11 +0100 Subject: [PATCH] setup target_host for tests in test main class Signed-off-by: Nico Schottelius --- cdist/test/__init__.py | 2 ++ cdist/test/emulator/__init__.py | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cdist/test/__init__.py b/cdist/test/__init__.py index a8c6103b..ab767699 100644 --- a/cdist/test/__init__.py +++ b/cdist/test/__init__.py @@ -35,6 +35,8 @@ class CdistTestCase(unittest.TestCase): remote_exec = os.path.join(global_fixtures_dir, "remote", "exec") remote_copy = os.path.join(global_fixtures_dir, "remote", "copy") + target_host = 'cdisttesthost' + def mkdtemp(self, **kwargs): return tempfile.mkdtemp(prefix='tmp.cdist.test.', **kwargs) diff --git a/cdist/test/emulator/__init__.py b/cdist/test/emulator/__init__.py index 871083f8..f9743e16 100644 --- a/cdist/test/emulator/__init__.py +++ b/cdist/test/emulator/__init__.py @@ -39,7 +39,6 @@ my_dir = op.abspath(op.dirname(__file__)) fixtures = op.join(my_dir, 'fixtures') conf_dir = op.join(fixtures, 'conf') - class EmulatorTestCase(test.CdistTestCase): def setUp(self): @@ -48,7 +47,6 @@ class EmulatorTestCase(test.CdistTestCase): self.temp_dir = self.mkdtemp() handle, self.script = self.mkstemp(dir=self.temp_dir) os.close(handle) - self.target_host = 'localhost' out_path = self.temp_dir self.local = local.Local( target_host=self.target_host,