def make_document(obj): d = Document() d.append_head(get_treeview_css()) d.append_head(Script(script=get_copylinks_js(JS_ACTIVATE_COPYLINKS_DOC))) d.title = "{} - H5Glance".format(file_or_grp_name(obj)) d.append_body(make_fragment(obj)) return d
def test_title(self): doc = Document(title="Test Title") assert_equal("Test Title", doc.title) assert_equal("Test Title", doc.root.head.title.title) doc.title = "New Title" assert_equal("New Title", doc.title) assert_equal("New Title", doc.root.head.title.title)