Ejemplo n.º 1
0
def get_checklist_item(checklist_id):
    log("User requested specific checklist item", "LOW", "PASS")
    val_float(checklist_id)

    result = checklists_kb.query.filter(
        checklists_kb.checklistID == checklist_id).one()
    return result
Ejemplo n.º 2
0
 def test_val_float(self):
     """Test if the val_float method is working"""
     self.assertTrue(val_float(10.11))
     try:
         self.assertFalse(val_float(1337))
         self.assertFalse(val_float("woop woop 1337"))
         self.assertFalse(val_float("woop %$*@><'1337"))
     except BadRequest:
         return True
Ejemplo n.º 3
0
def get_checklist_item(checklist_id, id_checklist):
    log("User requested specific checklist item", "LOW", "PASS")
    val_float(checklist_id)
    val_num(id_checklist)
    # 0 = ASVS
    # 1 = MASVS
    if (id_checklist == 0):
        result = checklists_kb.query.filter((checklists_kb.checklistID == checklist_id) & (checklists_kb.kbID < 400)).one()
    else:
        result = checklists_kb.query.filter((checklists_kb.checklistID == checklist_id) & (checklists_kb.kbID >= 400) & (checklists_kb.kbID < 800)).one()
    return result
Ejemplo n.º 4
0
def get_checklist_item(checklist_id, id_checklist):
    log("User requested specific checklist item", "LOW", "PASS")
    val_float(checklist_id)
    val_num(id_checklist)

    # 0 = ASVS
    # 1 = MASVS
    if (id_checklist == 0):
        result = checklists_kb.query.filter((checklists_kb.checklistID == checklist_id) & (checklists_kb.kbID < 400)).one()
    else:
        result = checklists_kb.query.filter((checklists_kb.checklistID == checklist_id) & (checklists_kb.kbID >= 400) & (checklists_kb.kbID < 800)).one()
    return result
Ejemplo n.º 5
0
def get_checklist_item(checklist_id):
    log("User requested specific checklist item", "LOW", "PASS")
    val_float(checklist_id)
   
    result = checklists_kb.query.filter(checklists_kb.checklistID == checklist_id).one()
    return result