コード例 #1
0
def test_msg_ser():
    assert msg_ser("a.b.c", "dict") == "a.b.c"
    with pytest.raises(MessageException):
        msg_ser([1, 2], "dict")
    with pytest.raises(OidcMsgError):
        msg_ser([1, 2], "list")
コード例 #2
0
def msg_list_ser(insts, sformat, lev=0):
    return [msg_ser(inst, sformat, lev) for inst in insts]
コード例 #3
0
def test_msg_ser():
    assert msg_ser('a.b.c', 'dict') == 'a.b.c'
    with pytest.raises(MessageException):
        msg_ser([1, 2], 'dict')
    with pytest.raises(OidcMsgError):
        msg_ser([1, 2], 'list')