Lines Matching defs:TestCaseData

390             aoRet.append(TestCaseData().initFromDbRow(aoRow));
396 Returns an array of objects of type TestCaseData on which
414 aoRet.append(TestCaseData().initFromDbRow(aoRow));
418 class TestCaseData(ModelDataBase):
520 sError = TestCaseData.validateTestBoxReqExpr(oValue);
522 sError = TestCaseData.validateBuildReqExpr(oValue);
524 _, sError = TestCaseData.validateStr(oValue, fAllowUnicodeSymbols=False);
547 return TestCaseData.matchesTestBoxPropsEx(oTestBoxData, self.sTestBoxReqExpr);
557 return TestCaseData.matchesBuildPropsEx(oBuildDataEx, self.sBuildReqExpr);
614 TestCaseData._safelyEvalExpr(sExpr, dLocals, True);
660 return TestCaseData._safelyValidateReqExpr(sExpr, adTestBoxes);
664 """ Worker for TestCaseData.matchesTestBoxProps and TestCaseArgsDataEx.matchesTestBoxProps. """
685 return TestCaseData._safelyEvalExpr(sExpr, dLocals);
726 return TestCaseData._safelyValidateReqExpr(sExpr, adBuilds);
747 return TestCaseData._safelyEvalExpr(sExpr, dLocals);
752 class TestCaseDataEx(TestCaseData):
766 TestCaseData.__init__(self);
768 # List of objects of type TestCaseData (or TestCaseDataEx, we don't
797 TestCaseData.initFromDbRow(self, aoRow);
804 TestCaseData.initFromDbWithId(self, oDb, idTestCase, tsNow, sPeriodBack);
811 TestCaseData.initFromDbWithGenId(self, oDb, idGenTestCase);
819 return TestCaseData.getAttributeParamNullValues(self, sAttr);
824 return TestCaseData.convertParamToAttribute(self, sAttr, sParam, oValue, oDisp, fStrict);
829 oDep = TestCaseData();
855 return TestCaseData._validateAndConvertAttribute(self, sAttr, sParam, oValue, aoNilValues, fAllowNull, oDb);
918 dErrors = TestCaseData._validateAndConvertWorker(self, asAllowNullAttributes, oDb);
938 Fetches all test case records from DB (TestCaseData).
948 aoRet.append(TestCaseData().initFromDbRow(aoRow))
1190 if not TestCaseData().initFromOther(oOldDataEx).isEqual(oData):
1360 self.aoSamples = [TestCaseData(),];
1363 self.assertEqual(TestCaseData.validateTestBoxReqExpr(None), None);
1364 self.assertEqual(TestCaseData.validateTestBoxReqExpr(''), None);
1367 self.assertEqual(TestCaseData.validateTestBoxReqExpr('cMbMemory > 10'), None);
1368 self.assertEqual(TestCaseData.validateTestBoxReqExpr('cMbScratch < 10'), None);
1369 self.assertEqual(TestCaseData.validateTestBoxReqExpr('fChipsetIoMmu'), None);
1370 self.assertEqual(TestCaseData.validateTestBoxReqExpr('fChipsetIoMmu is True'), None);
1371 self.assertEqual(TestCaseData.validateTestBoxReqExpr('fChipsetIoMmu is False'), None);
1372 self.assertEqual(TestCaseData.validateTestBoxReqExpr('fChipsetIoMmu is None'), None);
1373 self.assertEqual(TestCaseData.validateTestBoxReqExpr('isinstance(fChipsetIoMmu, bool)'), None);
1374 self.assertEqual(TestCaseData.validateTestBoxReqExpr('isinstance(iTestBoxScriptRev, int)'), None);
1375 self.assertEqual(TestCaseData.validateTestBoxReqExpr('isinstance(cMbScratch, long)'), None);
1378 self.assertNotEqual(TestCaseData.validateTestBoxReqExpr('this is an bad expression, surely it must be'), None);
1379 self.assertNotEqual(TestCaseData.validateTestBoxReqExpr('x = 1 + 1'), None);
1380 self.assertNotEqual(TestCaseData.validateTestBoxReqExpr('__import__(\'os\').unlink(\'/tmp/no/such/file\')'), None);
1381 self.assertNotEqual(TestCaseData.validateTestBoxReqExpr('print "foobar"'), None);