Пример #1
0
 def test_BinaryValidator(self):
     self.doValidationTest(validation.BinaryValidator(),
                           good=[
                               "bytestring"
     ], bad=[
                               None, u"no unicode"
     ])
Пример #2
0
 def setBuildData(self, buildid, name, value, source):
     validation.verifyType(self.testcase, 'buildid', buildid,
                           validation.IntValidator())
     validation.verifyType(self.testcase, 'name', name,
                           validation.StringValidator())
     validation.verifyType(self.testcase, 'value', value,
                           validation.BinaryValidator())
     validation.verifyType(self.testcase, 'source', source,
                           validation.StringValidator())
     yield self.master.db.build_data.setBuildData(buildid, name, value,
                                                  source)