def test_set_null_base():
    ctx = Context(base="http://example.org/app/data/item",
                  source={'@base': None})
    assert ctx.base is None
    assert ctx.resolve_iri("../other") == "../other"
def test_set_null_base():
    ctx = Context(base="http://example.org/app/data/item",
            source={'@base': None})
    assert ctx.base is None
    assert ctx.resolve_iri("../other") == "../other"
def test_resolve_relative_base():
    ctx = Context(base="http://example.org/app/data/item",
                  source={'@base': "../"})
    assert ctx.base == "http://example.org/app/"
    assert ctx.resolve_iri("../other") == "http://example.org/other"
def test_resolve_relative_base():
    ctx = Context(base="http://example.org/app/data/item",
            source={'@base': "../"})
    assert ctx.base == "http://example.org/app/"
    assert ctx.resolve_iri("../other") == "http://example.org/other"