示例#1
0
    def testInsertCategoryName1WeightLong(self):
        aCategory = category()
        result = aCategory.insertCategory('A', ((2**28) - 1))
        self.assertTrue(result)

        # Eliminando la categoria
        aCategory.deleteCategory('A')
示例#2
0
    def testInsertCategoryExists(self):
        aCategory = category()
        result = aCategory.insertCategory('Kxtygzry1', 21)
        self.assertTrue(result)

        # Eliminando la categoria
        aCategory.deleteCategory('Kxtygzry1')
示例#3
0
    def testInsertCategoryName100Weight0(self):
        aCategory = category()
        result = aCategory.insertCategory('A' * 100, 0)
        self.assertTrue(result)

        # Eliminando la categoria
        aCategory.deleteCategory('A' * 100)
示例#4
0
 def testInsertCategoryWeight0(self):
     aCategory = category()
     result    = aCategory.insertCategory('Kxtygzrda',0)
     self.assertTrue(result)
      
     # Eliminando la categoria
     aCategory.deleteCategory('Kxtygzrda')
示例#5
0
    def testCicloIndirecto(self):
        # Insertamos Producto
        aBacklog = backlog()
        aBacklog.insertBacklog('Podn fjdd.', 'ODJdbeidbww', 1)
        searchBacklog = aBacklog.findName('Podn fjdd.')
        idFound0 = searchBacklog[0].BL_idBacklog

        # Insertamos la accion
        aAcc = accions()
        aAcc.insertAccion('cinrohbwidia', idFound0)
        search = aAcc.searchAccion('cinrohbwidia', idFound0)
        idFound = search[0].AC_idAccion

        # Insertamos la historia
        aHist = userHistory()
        aHist.insertUserHistory('BIEEIEB1', 0, 1, idFound, idFound0, 1, True,
                                TODAY)
        searchHist = aHist.searchUserHistory('BIEEIEB1', idFound0)
        idFound1 = searchHist[0].UH_idUserHistory

        # Insertamos la categoria
        aCategory = category()
        aCategory.insertCategory('wofhweoifh', 1)

        # Insertamos la tarea 1
        aTarea = task()
        aTarea.insertTask('dwidjw', 1, 1, idFound1, True, TODAY)
        searchTask1 = aTarea.searchTask('dwidjw')
        idprimera = searchTask1[0].HW_idTask

        # Insertamos la tarea 2
        bTarea = task()
        bTarea.insertTask('dfghj', 2, 2, idFound1, True, TODAY)
        searchTask2 = bTarea.searchTask('dfghj')
        idsegunda = searchTask2[0].HW_idTask

        # Insertamos la tarea 3
        cTarea = task()
        cTarea.insertTask('dfghj2', 3, 3, idFound1, True, TODAY)
        searchTask3 = cTarea.searchTask('dfghj2')
        idtercera = searchTask3[0].HW_idTask

        #Insertamos la precedencia
        aPrecedence = precedence()
        aPrecedence.insertPrecedence(idprimera, idsegunda, idFound0)
        aPrecedence.insertPrecedence(idsegunda, idtercera, idFound0)
        self.assertEqual(
            (aPrecedence.insertPrecedence(idtercera, idprimera, idFound0)),
            None)

        # Eliminamos la precedencia, tarea, categoria, historia, accion y producto
        aPrecedence.deletePrecedence(idprimera, idsegunda)
        aPrecedence.deletePrecedence(idsegunda, idtercera)
        aTarea.deleteTask('dwidjw')
        bTarea.deleteTask('dfghj')
        bTarea.deleteTask('dfghj2')
        aCategory.deleteCategory('wofhweoifh')
        aHist.deleteUserHistory(idFound1)
        aAcc.deleteAccion('cinrohbwidia', idFound0)
        aBacklog.deleteProduct('Podn fjdd.')
示例#6
0
    def testInsertCategoryName100Weight0(self):
        aCategory = category()
        result    = aCategory.insertCategory('A'*100,0)
        self.assertTrue(result)
 
        # Eliminando la categoria
        aCategory.deleteCategory('A'*100)
示例#7
0
 def testDeleteCategoryNameStringArray(self):
     aCategory = category()
     aCategory.insertCategory('[]',1)
      
     # Eliminando la categoria
     result = aCategory.deleteCategory('[]')
     self.assertTrue(result)
示例#8
0
 def testDeleteCategoryNameDictionary(self):
     aCategory = category()
     aCategory.insertCategory({},1)
      
     # Eliminando la categoria
     result = aCategory.deleteCategory({})
     self.assertFalse(result)
示例#9
0
 def testDeleteCategoryNameArray(self):
     aCategory = category()
     aCategory.insertCategory([],1)
      
     # Eliminando la categoria
     result = aCategory.deleteCategory([])
     self.assertFalse(result)
示例#10
0
 def testDeleteCategoryNameEnie(self):
     aCategory = category()
     aCategory.insertCategory('ñ',1)
      
     # Eliminando la categoria
     result = aCategory.deleteCategory('ñ')
     self.assertTrue(result)
示例#11
0
    def testInsertCategoryName1WeightLong(self):
        aCategory = category()
        result    = aCategory.insertCategory('A',((2**28)-1))
        self.assertTrue(result)
 
        # Eliminando la categoria
        aCategory.deleteCategory('A')
示例#12
0
 def testDeleteCategoryNameNumber(self):
     aCategory = category()
     aCategory.insertCategory(88,1)
      
     # Eliminando la categoria
     result = aCategory.deleteCategory(88)
     self.assertFalse(result)
示例#13
0
 def testDeleteCategoryName101(self):
     aCategory = category()
     aCategory.insertCategory('C'*101,1)
      
     # Eliminando la categoria
     result = aCategory.deleteCategory('C'*101)
     self.assertFalse(result)
示例#14
0
 def testDeleteCategoryNameLong(self):
     aCategory = category()
     aCategory.insertCategory('C'*((2**28)-1),1)
      
     # Eliminando la categoria
     result = aCategory.deleteCategory('C'*((2**28)-1))
     self.assertFalse(result)
示例#15
0
 def testDeleteCategoryExist(self):
     aCategory = category()
     aCategory.insertCategory('Kxtygzrda',1)
      
     # Eliminando la categoria
     result = aCategory.deleteCategory('Kxtygzrda')
     self.assertTrue(result)
示例#16
0
 def testDeleteCategoryName50(self):
     aCategory = category()
     aCategory.insertCategory('C'*50,1)
      
     # Eliminando la categoria
     result = aCategory.deleteCategory('C'*50)
     self.assertTrue(result)
示例#17
0
    def testInsertCategory100Exists(self):
        aCategory = category()
        result = aCategory.insertCategory('A' * 100, 2)
        self.assertTrue(result)

        # Eliminando la categoria
        aCategory.deleteCategory('A' * 100)
示例#18
0
    def testDeleteCategoryNameNumber(self):
        aCategory = category()
        aCategory.insertCategory(88, 1)

        # Eliminando la categoria
        result = aCategory.deleteCategory(88)
        self.assertFalse(result)
示例#19
0
    def testDeleteCategoryNameArray(self):
        aCategory = category()
        aCategory.insertCategory([], 1)

        # Eliminando la categoria
        result = aCategory.deleteCategory([])
        self.assertFalse(result)
示例#20
0
    def testDeleteCategoryNameLong(self):
        aCategory = category()
        aCategory.insertCategory('C' * ((2**28) - 1), 1)

        # Eliminando la categoria
        result = aCategory.deleteCategory('C' * ((2**28) - 1))
        self.assertFalse(result)
示例#21
0
    def testDeleteCategoryNameEnie(self):
        aCategory = category()
        aCategory.insertCategory('ñ', 1)

        # Eliminando la categoria
        result = aCategory.deleteCategory('ñ')
        self.assertTrue(result)
示例#22
0
    def testDeleteCategoryName101(self):
        aCategory = category()
        aCategory.insertCategory('C' * 101, 1)

        # Eliminando la categoria
        result = aCategory.deleteCategory('C' * 101)
        self.assertFalse(result)
示例#23
0
    def testDeleteCategoryName50(self):
        aCategory = category()
        aCategory.insertCategory('C' * 50, 1)

        # Eliminando la categoria
        result = aCategory.deleteCategory('C' * 50)
        self.assertTrue(result)
示例#24
0
    def testDeleteCategoryExist(self):
        aCategory = category()
        aCategory.insertCategory('Kxtygzrda', 1)

        # Eliminando la categoria
        result = aCategory.deleteCategory('Kxtygzrda')
        self.assertTrue(result)
示例#25
0
    def testDeleteCategoryNameStringArray(self):
        aCategory = category()
        aCategory.insertCategory('[]', 1)

        # Eliminando la categoria
        result = aCategory.deleteCategory('[]')
        self.assertTrue(result)
示例#26
0
    def testDeleteCategoryNameDictionary(self):
        aCategory = category()
        aCategory.insertCategory({}, 1)

        # Eliminando la categoria
        result = aCategory.deleteCategory({})
        self.assertFalse(result)
示例#27
0
    def testInsertCategoryWeight0(self):
        aCategory = category()
        result = aCategory.insertCategory('Kxtygzrda', 0)
        self.assertTrue(result)

        # Eliminando la categoria
        aCategory.deleteCategory('Kxtygzrda')
示例#28
0
    def testInsertCategory100Exists(self):
        aCategory = category()
        result    = aCategory.insertCategory('A'*100,2)
        self.assertTrue(result)
 
        # Eliminando la categoria
        aCategory.deleteCategory('A'*100)
示例#29
0
    def testInsertCategoryExists(self):
        aCategory = category()
        result    = aCategory.insertCategory('Kxtygzry1',21)
        self.assertTrue(result)
 
        # Eliminando la categoria
        aCategory.deleteCategory('Kxtygzry1')
示例#30
0
 def testUpdateCategoryName100Newname0Weight0(self):
     aCategory = category()
     aCategory.insertCategory('C'*100,1)
     result    = aCategory.updateCategory('C'*100, '', 0)
     self.assertFalse(result)
      
     # Eliminando la categoria
     aCategory.deleteCategory('C'*100)
示例#31
0
 def testUpdateCategoryWeightLong(self):
     aCategory = category()
     aCategory.insertCategory('Kxtygzrda',1)
     result    = aCategory.updateCategory('Kxtygzrda', 'Nxyvz kxtygzrya', ((2**28)-1))
     self.assertTrue(result)
      
     # Eliminando la categoria
     aCategory.deleteCategory('Nxyvz kxtygzrya')
示例#32
0
 def testUpdateCategoryNewnameLong(self):
     aCategory = category()
     aCategory.insertCategory('Kxtygzrda',1)
     result    = aCategory.updateCategory('Kxtygzrda', 'N'*((2**28)-1), 2)
     self.assertFalse(result)
      
     # Eliminando la categoria
     aCategory.deleteCategory('Kxtygzrda')
示例#33
0
 def testUpdateCategoryNewname101(self):
     aCategory = category()
     aCategory.insertCategory('Kxtygzrda',1)
     result    = aCategory.updateCategory('C', 'N'*101, 2)
     self.assertFalse(result)
      
     # Eliminando la categoria
     aCategory.deleteCategory('Kxtygzrda')
示例#34
0
 def testUpdateCategoryNameNewname100(self):
     aCategory = category()
     aCategory.insertCategory('Kxtygzrda',1)
     result    = aCategory.updateCategory('Kxtygzrda', 'N'*100, 2)
     self.assertTrue(result)
      
     # Eliminando la categoria
     aCategory.deleteCategory('N'*100)
示例#35
0
 def testUpdateCategoryName100Newname(self):
     aCategory = category()
     aCategory.insertCategory('C'*100,1)
     result    = aCategory.updateCategory('C'*100, 'Nxyvz kxtygzrya', 2)
     self.assertTrue(result)
      
     # Eliminando la categoria
     aCategory.deleteCategory('Nxyvz kxtygzrya')
示例#36
0
    def testSearchIdCategoryDictionary(self):
        aCategory = category()
        aCategory.insertCategory('Kxtygzrda', 1)
        result = aCategory.searchIdCategory({})
        self.assertFalse(result)

        # Eliminando la categoria
        aCategory.deleteCategory('Kxtygzrda')
示例#37
0
 def testSearchIdCategoryNotExist(self):
     aCategory = category()
     aCategory.insertCategory('Kxtygzrda',1)
     result    = aCategory.searchIdCategory(99)
     self.assertFalse(result)
      
     # Eliminando la categoria
     aCategory.deleteCategory('Kxtygzrda')    
示例#38
0
 def testUpdateCategoryNameNewnameNumberWeight(self):
     aCategory = category()
     aCategory.insertCategory('Kxtygzrda',1)
     result    = aCategory.updateCategory('Kxtygzrda', 21, 3)
     self.assertFalse(result)
      
     # Eliminando la categoria
     aCategory.deleteCategory('Kxtygzrda')
示例#39
0
 def testUpdateCategoryName100NewnameLongWeightLong1(self):
     aCategory = category()
     aCategory.insertCategory('C'*100,1)
     result    = aCategory.updateCategory('C', 'N'*((2**28)-1), 1)
     self.assertFalse(result)
      
     # Eliminando la categoria
     aCategory.deleteCategory('C'*100)        
示例#40
0
    def testInsertCategoryEquals(self):
        aCategory = category()
        result = aCategory.insertCategory('Kxtygzrda', 2)
        result1 = aCategory.insertCategory('Kxtygzrda', 3)
        self.assertFalse(result1)

        # Eliminando la categoria
        aCategory.deleteCategory('Kxtygzrda')
示例#41
0
 def testUpdateCategoryName1Newname1WeightLong(self):
     aCategory = category()
     aCategory.insertCategory('C',1)
     result    = aCategory.updateCategory('C', 'N', (2**28)-1)
     self.assertTrue(result)
      
     # Eliminando la categoria
     aCategory.deleteCategory('N')
示例#42
0
    def testInsertCategory100Equals(self):
        aCategory = category()
        result = aCategory.insertCategory('C' * 100, 2)
        result1 = aCategory.insertCategory('C' * 100, 3)
        self.assertFalse(result1)

        # Eliminando la categoria
        aCategory.deleteCategory('C' * 100)
示例#43
0
 def testUpdateCategoryNameNewnameEnieWeight(self):
     aCategory = category()
     aCategory.insertCategory('Kxtygzrda',1)
     result    = aCategory.updateCategory('Kxtygzrda', 'ñ', 3)
     self.assertTrue(result)
      
     # Eliminando la categoria
     aCategory.deleteCategory('ñ')
示例#44
0
 def testSearchIdCategoryDictionary(self):
     aCategory = category()
     aCategory.insertCategory('Kxtygzrda',1)
     result    = aCategory.searchIdCategory({})
     self.assertFalse(result)
      
     # Eliminando la categoria
     aCategory.deleteCategory('Kxtygzrda')
示例#45
0
 def testUpdateCategoryNameNewnameWeightNegativeNumber(self):
     aCategory = category()
     aCategory.insertCategory('Kxtygzrda',1)
     result    = aCategory.updateCategory('Kxtygzrda', 'Nxyvz kxtygzrya', -3)
     self.assertFalse(result)
      
     # Eliminando la categoria
     aCategory.deleteCategory('Kxtygzrda')
示例#46
0
    def testSearchIdCategoryNotExist(self):
        aCategory = category()
        aCategory.insertCategory('Kxtygzrda', 1)
        result = aCategory.searchIdCategory(99)
        self.assertFalse(result)

        # Eliminando la categoria
        aCategory.deleteCategory('Kxtygzrda')
示例#47
0
 def testSearchIdCategoryLong(self):
     aCategory = category()
     aCategory.insertCategory('Kxtygzrda',1)
     result    = aCategory.searchIdCategory((2**28)-1)
     self.assertFalse(result)
      
     # Eliminando la categoria
     aCategory.deleteCategory('Kxtygzrda')
示例#48
0
    def testSearchIdCategoryLong(self):
        aCategory = category()
        aCategory.insertCategory('Kxtygzrda', 1)
        result = aCategory.searchIdCategory((2**28) - 1)
        self.assertFalse(result)

        # Eliminando la categoria
        aCategory.deleteCategory('Kxtygzrda')
示例#49
0
    def testUpdateCategoryNameNewnameNumberWeight(self):
        aCategory = category()
        aCategory.insertCategory('Kxtygzrda', 1)
        result = aCategory.updateCategory('Kxtygzrda', 21, 3)
        self.assertFalse(result)

        # Eliminando la categoria
        aCategory.deleteCategory('Kxtygzrda')
示例#50
0
    def testUpdateCategoryNameNewnameWeightNegativeNumber(self):
        aCategory = category()
        aCategory.insertCategory('Kxtygzrda', 1)
        result = aCategory.updateCategory('Kxtygzrda', 'Nxyvz kxtygzrya', -3)
        self.assertFalse(result)

        # Eliminando la categoria
        aCategory.deleteCategory('Kxtygzrda')
示例#51
0
    def testUpdateCategoryName100NewnameLongWeightLong1(self):
        aCategory = category()
        aCategory.insertCategory('C' * 100, 1)
        result = aCategory.updateCategory('C', 'N' * ((2**28) - 1), 1)
        self.assertFalse(result)

        # Eliminando la categoria
        aCategory.deleteCategory('C' * 100)
示例#52
0
    def testUpdateCategoryNameNewnameEnieWeight(self):
        aCategory = category()
        aCategory.insertCategory('Kxtygzrda', 1)
        result = aCategory.updateCategory('Kxtygzrda', 'ñ', 3)
        self.assertTrue(result)

        # Eliminando la categoria
        aCategory.deleteCategory('ñ')
示例#53
0
 def testInsertCategoryEquals(self):
     aCategory = category()
     result    = aCategory.insertCategory('Kxtygzrda',2)
     result1   = aCategory.insertCategory('Kxtygzrda',3)
     self.assertFalse(result1)
      
     # Eliminando la categoria
     aCategory.deleteCategory('Kxtygzrda')
示例#54
0
    def testUpdateCategoryName1Newname1WeightLong(self):
        aCategory = category()
        aCategory.insertCategory('C', 1)
        result = aCategory.updateCategory('C', 'N', (2**28) - 1)
        self.assertTrue(result)

        # Eliminando la categoria
        aCategory.deleteCategory('N')
示例#55
0
    def testUpdateCategoryWeight0(self):
        aCategory = category()
        aCategory.insertCategory('Kxtygzrda', 1)
        result = aCategory.updateCategory('Kxtygzrda', 'Nxyvz kxtygzrya', 0)
        self.assertTrue(result)

        # Eliminando la categoria
        aCategory.deleteCategory('Nxyvz kxtygzrya')
示例#56
0
    def testUpdateCategoryName100Newname0Weight0(self):
        aCategory = category()
        aCategory.insertCategory('C' * 100, 1)
        result = aCategory.updateCategory('C' * 100, '', 0)
        self.assertFalse(result)

        # Eliminando la categoria
        aCategory.deleteCategory('C' * 100)
示例#57
0
    def testUpdateCategoryNewname101(self):
        aCategory = category()
        aCategory.insertCategory('Kxtygzrda', 1)
        result = aCategory.updateCategory('C', 'N' * 101, 2)
        self.assertFalse(result)

        # Eliminando la categoria
        aCategory.deleteCategory('Kxtygzrda')
示例#58
0
    def testUpdateCategoryNewnameLong(self):
        aCategory = category()
        aCategory.insertCategory('Kxtygzrda', 1)
        result = aCategory.updateCategory('Kxtygzrda', 'N' * ((2**28) - 1), 2)
        self.assertFalse(result)

        # Eliminando la categoria
        aCategory.deleteCategory('Kxtygzrda')
示例#59
0
 def testInsertCategory100Equals(self):
     aCategory = category()
     result    = aCategory.insertCategory('C'*100,2)
     result1   = aCategory.insertCategory('C'*100,3)
     self.assertFalse(result1)
      
     # Eliminando la categoria
     aCategory.deleteCategory('C'*100)
示例#60
0
    def testUpdateCategoryNameNewname100(self):
        aCategory = category()
        aCategory.insertCategory('Kxtygzrda', 1)
        result = aCategory.updateCategory('Kxtygzrda', 'N' * 100, 2)
        self.assertTrue(result)

        # Eliminando la categoria
        aCategory.deleteCategory('N' * 100)