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
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
def test_instance_urifragment(): lib = wikilib.Library() assert lib.eURIFragment() == '/' smith = wikilib.Writer() lib.writers.append(smith) assert smith.eURIFragment() == '//@writers.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