예제 #1
0
파일: testSprint.py 프로젝트: cuble/dadapa
 def test_delete_empty_sprint(self):
     self._init_test_data(4, True)
     sprintDocStub.set_expected_check_result('unavailable', 'unavailable')
     self.sprint.delete()
     osStub.check_rmtree_called(self.sprintName)
     sprintDocStub.check_initialized_result([])
     sysOutputStub.check_sys_output("{0} is: new\n{0} deleted\n".format(self.sprintName))
예제 #2
0
파일: testSprint.py 프로젝트: cuble/dadapa
 def test_delete_worked_sprint(self):
     self._init_test_data(4, True)
     sprintDocStub.set_expected_check_result('worked', 'unavailable')
     self.sprint.delete()
     osStub.check_rmtree_called('')
     sprintDocStub.check_initialized_result([])
     sysOutputStub.check_sys_output("{0} is: worked\nDelete FORBIDDEN!\n".format(self.sprintName))
예제 #3
0
파일: testSprint.py 프로젝트: cuble/dadapa
 def test_initialize_exist_sprint(self):
     self._init_test_data(10, True)
     self.sprint.initialize()
     osStub.check_dir_created(self.sprintName)
     sysOutputStub.check_sys_output(self.sprintName+" exist, can't be initialized\n")
     sprintDocStub.check_initialized_result([])
     self.assertEqual("", osStub.curDir)
예제 #4
0
파일: testSprint.py 프로젝트: cuble/dadapa
 def _do_initialize(self, sprintNum=0):
     self._init_test_data(sprintNum, False)
     self.sprint.initialize()
     osStub.check_dir_created(self.sprintName)
     sysOutputStub.check_sys_output(self.sprintName + " created\n")
     sprintDocStub.check_initialized_result(sprintDir.fileList)
     self.assertEqual("", osStub.curDir)
예제 #5
0
파일: testSprint.py 프로젝트: cuble/dadapa
 def _do_check(self, state):
     self.sprint.check()
     stateStr=self.sprintName+' is: '+state+'\n'
     sysOutputStub.check_sys_output(stateStr)
     self.assertEqual("", osStub.curDir)
예제 #6
0
파일: testSprint.py 프로젝트: cuble/dadapa
 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")
예제 #7
0
파일: testSprint.py 프로젝트: cuble/dadapa
 def _print_help_check(self):
     sprint_main()
     sprintDirStub.check_objs_created()
     sprintDirStub.check_called()
     sysOutputStub.check_sys_output(helpString+'\n')
예제 #8
0
파일: testSprint.py 프로젝트: cuble/dadapa
 def test_delete_not_exist_sprint(self):
     self._init_test_data(0)
     self.sprint.delete()
     osStub.check_rmtree_called("")
     sysOutputStub.check_sys_output("{0} is: unavailable\n".format(self.sprintName))
예제 #9
0
파일: testSprint.py 프로젝트: cuble/dadapa
 def test_delete_new_sprint(self):
     self._init_test_data(1, True)
     sprintDocStub.set_expected_check_result('new', 'new')
     self.sprint.delete()
     osStub.check_rmtree_called(self.sprintName)
     sysOutputStub.check_sys_output("{0} is: new\n{0} deleted\n".format(self.sprintName))