Basic unit test for ConditionLingo

pull/2960/head
David Núñez 2022-09-22 13:42:48 +02:00 committed by Kieran Prasch
parent 49075e17cd
commit 56af2bf27f
1 changed files with 12 additions and 0 deletions

View File

@ -0,0 +1,12 @@
from nucypher.policy.conditions.lingo import ConditionLingo
def test_compound_condition_timelock():
conditions = [
{'returnValueTest': {'value': '0', 'comparator': '>'}, 'method': 'timelock'},
{'operator': 'and'},
{'returnValueTest': {'value': '99999999999999999', 'comparator': '<'}, 'method': 'timelock'},
]
clingo = ConditionLingo.from_list(conditions)
assert clingo.eval()