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")
def msg_list_ser(insts, sformat, lev=0): return [msg_ser(inst, sformat, lev) for inst in insts]
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')