def _initialize_doc_test(self, fname): self.doc = sprintDoc(fname) self.doc.initialize() fileIoStub.check_created_files(fname, sprintDoc.templates[fname]) sysOutputStub.check_sys_output("- "+fname+" created\n")
def _exist_doc_test(self, fname, filestate): doc = sprintDoc(fname) self.assertEqual(filestate, doc.check())
def test_initialize_unknown_doc(self): self.doc = sprintDoc('123') self.assertRaises(NameError, self.doc.initialize)
def test_doc_notexist(self): doc = sprintDoc('123') self.assertEqual('unavailable', doc.check())