Thanks for stopping by #novacut, mandel! And extra thanks for offering to promptly code up a solution!
For reference, here is the base test class I'm using to do the desktopcouch setup. This is only a slight modification of what Chad setup for me:
class CouchCase(TestCase): """ Base class for tests that need a desktopcouch testing Context. """
def setUp(self): self.home = TempHome() self.couchdir = tempfile.mkdtemp(prefix='dc-test.') self.ctx = dc_context(self.couchdir)
def tearDown(self): stop_couchdb(ctx=self.ctx) self.ctx = None shutil.rmtree(self.couchdir) self.couchdir = None self.home = None
The dc_context() function is the same from the above comment.
Thanks for stopping by #novacut, mandel! And extra thanks for offering to promptly code up a solution!
For reference, here is the base test class I'm using to do the desktopcouch setup. This is only a slight modification of what Chad setup for me:
class CouchCase( TestCase) :
"""
Base class for tests that need a desktopcouch testing Context.
"""
def setUp(self):
self.couchdir = tempfile. mkdtemp( prefix= 'dc-test. ') self.couchdir)
self.home = TempHome()
self.ctx = dc_context(
def tearDown(self):
stop_couchdb( ctx=self. ctx)
shutil. rmtree( self.couchdir)
self.couchdir = None
self.ctx = None
self.home = None
The dc_context() function is the same from the above comment.