Exemplo n.º 1
0
def test_complete_single_chunk():
    chunk = b'''
        <nstest xmlns="http://earthreader.github.io/"
                xmlns:nst="https://github.com/earthreader/libearth">
        </nstest>
    '''
    doc = read(XmlnsDoc, [chunk])
    complete(doc)
    assert doc.samens_attr is None
    assert doc.otherns_attr is None
Exemplo n.º 2
0
def test_complete_single_chunk():
    chunk = b'''
        <nstest xmlns="http://earthreader.github.io/"
                xmlns:nst="https://github.com/earthreader/libearth">
        </nstest>
    '''
    doc = read(XmlnsDoc, [chunk])
    complete(doc)
    assert doc.samens_attr is None
    assert doc.otherns_attr is None
Exemplo n.º 3
0
def test_complete_terminates_streaming():
    f = io.BytesIO(b'''
        <nstest xmlns="http://earthreader.github.io/"
                xmlns:nst="https://github.com/earthreader/libearth">
        </nstest>
    ''')
    doc = read(XmlnsDoc, f)
    complete(doc)
    f.close()
    assert doc.samens_attr is None
    assert doc.otherns_attr is None
Exemplo n.º 4
0
def test_complete_terminates_streaming():
    f = io.BytesIO(b'''
        <nstest xmlns="http://earthreader.github.io/"
                xmlns:nst="https://github.com/earthreader/libearth">
        </nstest>
    ''')
    doc = read(XmlnsDoc, f)
    complete(doc)
    f.close()
    assert doc.samens_attr is None
    assert doc.otherns_attr is None
Exemplo n.º 5
0
def test_complete(fx_test_doc):
    doc, _ = fx_test_doc
    assert is_partially_loaded(doc)
    complete(doc)
    assert not is_partially_loaded(doc)
Exemplo n.º 6
0
def test_complete(fx_test_doc):
    doc, _ = fx_test_doc
    assert is_partially_loaded(doc)
    complete(doc)
    assert not is_partially_loaded(doc)