Fix for invalid logical test cases

This commit is contained in:
stamparm 2013-03-01 12:04:49 +01:00
parent 440b484bf6
commit 55f33da85a

View File

@ -112,7 +112,8 @@ class Agent(object):
if conf.invalidLogical: if conf.invalidLogical:
match = re.search(r'\A[^ ]+', newValue) match = re.search(r'\A[^ ]+', newValue)
newValue = newValue[len(match.group() if match else ""):] newValue = newValue[len(match.group() if match else ""):]
value = "%s%s AND %s=%s" % (origValue, match.group() if match else "", randomInt(2), randomInt(2)) _ = randomInt(2)
value = "%s%s AND %s=%s" % (origValue, match.group() if match else "", _, _ + 1)
elif conf.invalidBignum: elif conf.invalidBignum:
value = "%d.%d" % (randomInt(6), randomInt(1)) value = "%d.%d" % (randomInt(6), randomInt(1))
else: else: