Exemplo n.º 1
0
def test_wikilib_eroot():
    lib = wikilib.Library()
    smith = wikilib.Writer()
    lib.writers.append(smith)
    assert smith.eContainer() is lib
    assert smith.eRoot() is lib
    assert wikilib.Library.eClass.eRoot() is wikilib.eClass
Exemplo n.º 2
0
def test_wikilib_econtents():
    smith = wikilib.Writer()
    book = wikilib.Book()
    lib = wikilib.Library()
    lib.writers.append(smith)
    lib.books.append(book)
    assert smith in lib.eContents
    assert book in lib.eContents
Exemplo n.º 3
0
def test_instance_urifragment():
    lib = wikilib.Library()
    assert lib.eURIFragment() == '/'
    smith = wikilib.Writer()
    lib.writers.append(smith)
    assert smith.eURIFragment() == '//@writers.0'
Exemplo n.º 4
0
def test_static_eclass_class():
    lib = wikilib.Library()
    assert lib.eClass.python_class is wikilib.Library
    assert wikilib.Library.eClass.python_class.eClass is wikilib.Library.eClass