def __init__(self, nbfile, logfile=None): if logfile: self.log = open(logfile, 'a') else: self.log = stdout dbutil.initDB() self.nbc = notebook.NotebookController( es.IEngineQueued(es.EngineService())) self.nbu = notebook.NotebookUser(self.nbc, 'test', 'test@localhost') self.user = self.nbu.user f = open(nbfile) nbs = f.read() f.close() if nbfile[-3:] == 'xml': self.nb = self.nbu.loadNotebookFromXML(nbs) else: self.nb = self.nbu.loadNotebookFromSparse(nbs)
def setUp(self): self.failingEngine = FailingEngineService() self.engine = es.IEngineQueued(self.failingEngine)
def setUp(self): self.rawEngine = es.EngineService() self.rawEngine.startService() self.engine = es.IEngineQueued(self.rawEngine)