Changeset 12243 for main/waeup.ikoba/trunk
- Timestamp:
- 15 Dec 2014, 11:18:31 (10 years ago)
- Location:
- main/waeup.ikoba/trunk/src/waeup/ikoba/documents
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.ikoba/trunk/src/waeup/ikoba/documents/browser.py
r12242 r12243 202 202 self.flash(_('The document requested has not yet been published.'), 203 203 type="warning") 204 self.redirect(self. url(self.context))204 self.redirect(self.application_url()) 205 205 super(HTMLDocumentDisplayContentPage, self).update() 206 206 return -
main/waeup.ikoba/trunk/src/waeup/ikoba/documents/fileviewlets.py
r12241 r12243 69 69 self.flash(_('The document requested has not yet been published.'), 70 70 type="warning") 71 self.redirect(self. url(self.context))71 self.redirect(self.application_url()) 72 72 return -
main/waeup.ikoba/trunk/src/waeup/ikoba/documents/tests/test_browser.py
r12240 r12243 158 158 in self.browser.contents) 159 159 IWorkflowState(document).setState(PUBLISHED) 160 self.browser. getLink("sample.pdf").click()160 self.browser.open(self.container_path + '/d101/sample.pdf') 161 161 self.assertEqual( 162 162 self.browser.headers['content-type'], 'application/pdf') … … 240 240 self.assertTrue( 241 241 '<h1>Hallo Welt</h1>' in self.browser.contents) 242 # The content can't be rendered yet 243 self.browser.open(self.container_path + '/d101/display') 244 self.assertTrue( 245 'The document requested has not yet been published' 246 in self.browser.contents) 247 # We have been redirected to the portal root 248 self.assertEqual(self.browser.url, 'http://localhost/app') 242 249 243 250 # Transitions can be performed … … 248 255 self.assertEqual(document.state, 'published') 249 256 257 # The content can be rendered 258 self.browser.open(self.container_path + '/d101/display') 259 self.assertTrue( 260 '<h1>Hallo Welt</h1>' in self.browser.contents) 261 250 262 # Documents can be removed 251 263 self.browser.getLink("en", index=2).click()
Note: See TracChangeset for help on using the changeset viewer.