mirror of https://github.com/nucypher/nucypher.git
Fix faulty condition tests - each needed a new copy of the condition dict.
parent
d414553e53
commit
b4a6e24d58
|
@ -101,11 +101,13 @@ def test_rpc_condition_schema_validation(rpc_condition):
|
|||
|
||||
with pytest.raises(InvalidConditionLingo):
|
||||
# chain id not an integer
|
||||
condition_dict = rpc_condition.to_dict()
|
||||
condition_dict["chain"] = str(TESTERCHAIN_CHAIN_ID)
|
||||
RPCCondition.from_dict(condition_dict)
|
||||
|
||||
with pytest.raises(InvalidConditionLingo):
|
||||
# chain id not a permitted chain
|
||||
condition_dict = rpc_condition.to_dict()
|
||||
condition_dict["chain"] = 90210 # Beverly Hills Chain :)
|
||||
RPCCondition.from_dict(condition_dict)
|
||||
|
||||
|
|
|
@ -60,16 +60,19 @@ def test_time_condition_schema_validation(time_condition):
|
|||
|
||||
with pytest.raises(InvalidConditionLingo):
|
||||
# invalid method name
|
||||
condition_dict = time_condition.to_dict()
|
||||
condition_dict["method"] = "my_blocktime"
|
||||
TimeCondition.from_dict(condition_dict)
|
||||
|
||||
with pytest.raises(InvalidConditionLingo):
|
||||
# chain id not an integer
|
||||
condition_dict = time_condition.to_dict()
|
||||
condition_dict["chain"] = str(TESTERCHAIN_CHAIN_ID)
|
||||
TimeCondition.from_dict(condition_dict)
|
||||
|
||||
with pytest.raises(InvalidConditionLingo):
|
||||
# chain id not a permitted chain
|
||||
condition_dict = time_condition.to_dict()
|
||||
condition_dict["chain"] = 90210 # Beverly Hills Chain :)
|
||||
TimeCondition.from_dict(condition_dict)
|
||||
|
||||
|
|
Loading…
Reference in New Issue