コード例 #1
0
    def testAddVulnToInterface(self):
        serv = Service('cuca')
        vuln = ModelObjectVuln('vuln')
        serv.addChild(vuln)

        self.assertIn(vuln, serv.childs.values(), 'Vuln not in childs')
        self.assertIn(vuln, serv.getVulns(), 'Vuln not accessible')
コード例 #2
0
ファイル: model_composite.py プロジェクト: tartamar/faraday
    def testAddVulnToInterface(self):
        serv = Service('cuca')
        vuln = ModelObjectVuln('vuln')
        serv.addChild(vuln)

        self.assertIn(vuln, serv.childs.values(), 'Vuln not in childs')
        self.assertIn(vuln, serv.getVulns(), 'Vuln not accessible')
コード例 #3
0
 def testDelCredentialFromServiceASYNC(self):
     service = Service('coco')
     cred = ModelObjectCred("int_mock0")
     service.addChild(cred)
     self.genericDelTest(service,
                         cred,
                         controller.ModelController.delCredFromServiceASYNC,
                         process_pending=True)
コード例 #4
0
 def testDelNoteFromServiceASYNC(self):
     service = Service('coco')
     note = ModelObjectNote("int_mock0")
     service.addChild(note)
     self.genericDelTest(service,
                         note,
                         controller.ModelController.delNoteFromServiceASYNC,
                         process_pending=True)
コード例 #5
0
 def testDelVulnFromServiceASYNC(self):
     service = Service('coco')
     vuln = ModelObjectVuln("int_mock0")
     service.addChild(vuln)
     self.genericDelTest(service,
                         vuln,
                         controller.ModelController.delVulnFromServiceASYNC,
                         process_pending=True)
コード例 #6
0
ファイル: model_composite.py プロジェクト: tartamar/faraday
    def testServiceWithMultipleChildTypes(self):
        serv = Service('cuca')
        vuln = ModelObjectVuln('vuln')
        note = ModelObjectNote('nota')
        serv.addChild(note)
        serv.addChild(vuln)

        self.assertEquals(len(serv.getVulns()), 1, "Vulns added is not 1")
        self.assertIn(vuln, serv.getVulns(), "Vuln not accessible")
        self.assertEquals(len(serv.getNotes()), 1, "Notes added is not 1")
        self.assertIn(note, serv.getNotes(), "Note not accessible")
コード例 #7
0
    def testServiceWithMultipleChildTypes(self):
        serv = Service('cuca')
        vuln = ModelObjectVuln('vuln')
        note = ModelObjectNote('nota')
        serv.addChild(note) 
        serv.addChild(vuln)

        self.assertEquals(len(serv.getVulns()), 1, "Vulns added is not 1")
        self.assertIn(vuln, serv.getVulns(), "Vuln not accessible")
        self.assertEquals(len(serv.getNotes()), 1, "Notes added is not 1") 
        self.assertIn(note, serv.getNotes(), "Note not accessible")
コード例 #8
0
ファイル: model_controller.py プロジェクト: BwRy/faraday
 def testDelCredentialFromModelObjectSYNC(self):
     service = Service('coco')
     cred = ModelObjectCred("int_mock0") 
     service.addChild(cred.getID(), cred)
     self.genericDelTest(service, cred, 
             controller.ModelController.delCredSYNC)
コード例 #9
0
ファイル: model_controller.py プロジェクト: BwRy/faraday
 def testDelCredentialFromServiceASYNC(self):
     service = Service('coco')
     cred = ModelObjectCred("int_mock0") 
     service.addChild(cred.getID(), cred)
     self.genericDelTest(service, cred, 
             controller.ModelController.delCredFromServiceASYNC, process_pending=True)
コード例 #10
0
ファイル: model_controller.py プロジェクト: BwRy/faraday
 def testDelNoteFromServiceASYNC(self):
     service = Service('coco')
     note = ModelObjectNote("int_mock0") 
     service.addChild(note.getID(), note)
     self.genericDelTest(service, note, 
             controller.ModelController.delNoteFromServiceASYNC, process_pending=True)
コード例 #11
0
ファイル: model_controller.py プロジェクト: BwRy/faraday
 def testDelVulnFromServiceASYNC(self):
     service = Service('coco')
     vuln = ModelObjectVuln("int_mock0") 
     service.addChild(vuln.getID(), vuln)
     self.genericDelTest(service, vuln, 
             controller.ModelController.delVulnFromServiceASYNC, process_pending=True)
コード例 #12
0
 def testDelNoteFromServiceSYNC(self):
     service = Service('coco')
     note = ModelObjectNote("int_mock0") 
     service.addChild(note)
     self.genericDelTest(service, note, 
             controller.ModelController.delNoteFromServiceSYNC)
コード例 #13
0
 def testDelVulnFromServiceSYNC(self):
     service = Service('coco')
     vuln = ModelObjectVuln("int_mock0") 
     service.addChild(vuln)
     self.genericDelTest(service, vuln, 
             controller.ModelController.delVulnFromServiceSYNC)
コード例 #14
0
 def testDelCredentialFromModelObjectSYNC(self):
     service = Service('coco')
     cred = ModelObjectCred("int_mock0")
     service.addChild(cred)
     self.genericDelTest(service, cred,
                         controller.ModelController.delCredSYNC)