Пример #1
0
def test_MContext_set_error():
    mp = MPath()
    mc = MContext(mp)
    with pytest.raises(TypeError):
        mc.path_info = 10
Пример #2
0
def test_MContext(pthinfo):
    mp = MPath()
    mc = MContext(mp)
    mc.path_info = pthinfo
    assert mp.filename == "/a/b"
    assert mc.evaluate() == "/a/b"