def testScanMalicious(self): "Tests the dummy scanner's scan method with an evil file." malicious, si = dummy.scan(self.maliciousfile) self.assertTrue(malicious) expected = (self.scannerfile, self.version, trim_microseconds(self.curtime)) actual = (si.scannervv, si.sigversion, trim_microseconds(si.sigdate)) self.assertEquals(expected, actual)
def testScanBenign(self): "Tests the dummy scanner's scan method." malicious, si = dummy.scan(self.benignfile) self.assertFalse(malicious) expected = (self.scannerfile, self.version, trim_microseconds(self.curtime)) actual = (si.scannervv, si.sigversion, trim_microseconds(si.sigdate)) self.assertEquals(expected, actual)