test_multiple_decorators.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:ratatoskr 作者: ngergo 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号