def test_register_operation_wraps_protectron_unmatching_schema():
@register_operation
@protectron(Schema({'a': int}))
def mirror2(a):
return a
event = {
'operation': 'mirror2',
'args': {
'a': '42'
}
}
with pytest.raises(Invalid):
assert dispatch_event(event) == 42
评论列表
文章目录