introduce new cdist.test.CdistTestCase base class which handles common tasks

Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
This commit is contained in:
Steven Armstrong 2011-10-19 17:59:21 +02:00
commit 97ab6effa4
9 changed files with 25 additions and 69 deletions

View file

@ -19,9 +19,7 @@
#
#
import unittest
import os
import tempfile
import getpass
import shutil
import string
@ -31,13 +29,7 @@ import cdist
from cdist.exec import remote
class RemoteTestCase(unittest.TestCase):
def mkdtemp(self, **kwargs):
return tempfile.mkdtemp(prefix='tmp.cdist.test.', **kwargs)
def mkstemp(self, **kwargs):
return tempfile.mkstemp(prefix='tmp.cdist.test.', **kwargs)
class RemoteTestCase(test.CdistTestCase):
def setUp(self):
self.temp_dir = self.mkdtemp()