Beispiel #1
0
 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))
Beispiel #2
0
 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))
Beispiel #3
0
 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)
Beispiel #4
0
 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)
Beispiel #5
0
 def test_check_exist_worked_sprint_with_second_file_missed(self):
     self._init_test_data(1001, True)
     sprintDocStub.set_expected_check_result('worked', 'unavailable')
     self._do_check('worked')
     sprintDocStub.check_initialized_result([sprintDir.fileList[1]])
Beispiel #6
0
 def test_check_exist_worked_sprint(self):
     self._init_test_data(2,True)
     sprintDocStub.set_expected_check_result('worked', 'worked')
     self._do_check('worked')
     sprintDocStub.check_initialized_result([])
Beispiel #7
0
 def test_check_exist_wrong(self):
     self._init_test_data(1, True)
     sprintDocStub.set_expected_check_result('undefined')
     self._do_check('undefined')
     sprintDocStub.check_initialized_result([])
Beispiel #8
0
 def test_check_exist_new_sprint(self):
     self._init_test_data(1, True)
     sprintDocStub.set_expected_check_result('new', 'new')
     self._do_check('new')
     sprintDocStub.check_initialized_result([])
Beispiel #9
0
 def test_check_exist_empty(self):
     self._init_test_data(1, True)
     sprintDocStub.set_expected_check_result('unavailable', 'unavailable')
     self._do_check('new')
     sprintDocStub.check_initialized_result(sprintDir.fileList)