コード例 #1
0
ファイル: test_pytmfunc.py プロジェクト: chadeckles/pytm
 def test_DS02(self):
     process1 = Process("Process1")
     lambda1 = Lambda("Lambda1")
     process1.environment = "Production"
     lambda1.environment = "Production"
     threat = threats["DS02"]
     self.assertTrue(threat.apply(process1))
     self.assertTrue(threat.apply(lambda1))
コード例 #2
0
 def test_DS02(self):
     process1 = Process("Process1")
     lambda1 = Lambda("Lambda1")
     process1.environment = 'Production'
     lambda1.environment = 'Production'
     ThreatObj = Threat(next(item for item in threats_json if item["SID"] == "DS02"))
     self.assertTrue(ThreatObj.apply(process1))
     self.assertTrue(ThreatObj.apply(lambda1))