def make_document(self, root): from kotti.resources import Document doc = root['doc'] = Document() from kotti import DBSession DBSession.flush() DBSession.refresh(doc) return doc
def make_document(self, root): from kotti import DBSession from kotti.resources import Document content = root['doc'] = Document(title=u'MyDocument') DBSession.flush() DBSession.refresh(content) return content
def make_document(self): from kotti import DBSession from kotti.resources import Document content = self.root['document'] = Document() DBSession.flush() DBSession.refresh(content) return content
def make_document(self, root): from kotti import DBSession from kotti.resources import Document content = root["document"] = Document() DBSession.flush() DBSession.refresh(content) return content
def make_document(root): from kotti import DBSession from kotti.resources import Document content = root["document"] = Document() DBSession.flush() DBSession.refresh(content) return content
def test_change_workflow_extended_content(self, root, workflow, browser): from zope import interface from kotti import DBSession from kotti.interfaces import IDefaultWorkflow from kotti.resources import Content from kotti.testing import BASE_URL content = root["content"] = Content() assert content.state == None interface.directlyProvides(content, IDefaultWorkflow) DBSession.flush() DBSession.refresh(content) browser.open(BASE_URL + "/contents") assert content.state == u"private" browser.getLink("Make Public").click() assert content.state == u"public"