-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
298 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
<html xmlns="http://www.w3.org/1999/xhtml" | ||
xml:lang="en" | ||
xmlns:tal="http://xml.zope.org/namespaces/tal" | ||
xmlns:metal="http://xml.zope.org/namespaces/metal" | ||
metal:use-macro="context/main_template/macros/master" | ||
xmlns:i18n="http://xml.zope.org/namespaces/i18n" | ||
i18n:domain="collective.liveblog"> | ||
<head> | ||
<metal:block metal:fill-slot="top_slot" | ||
tal:define="dummy python:request.set('disable_border', 1)" /> | ||
</head> | ||
<body> | ||
<metal:block fill-slot="main"> | ||
<article itemscope | ||
itemtype="http://schema.org/BlogPosting" | ||
tal:define="update view/update"> | ||
<header> | ||
<div tal:replace="structure provider:plone.abovecontenttitle" /> | ||
|
||
<h1 class="documentFirstHeading" | ||
itemprop="headline" | ||
tal:content="update/title" | ||
tal:condition="update/title"> | ||
Title | ||
</h1> | ||
|
||
<div class="documentByLine" | ||
id="plone-document-byline" | ||
i18n:domain="plone" | ||
tal:condition="view/show_byline"> | ||
<span class="documentAuthor" tal:condition="not:view/is_anonymous"> | ||
<tal:i18n i18n:translate="label_by_author"> | ||
by | ||
<span property="rnews:author" tal:content="update/creator"> | ||
Roland Barthes | ||
</span> | ||
</tal:i18n> | ||
— | ||
</span> | ||
|
||
<tal:dates define="published update/datetime; | ||
modified update/modified"> | ||
<span class="documentPublished"> | ||
<span i18n:translate="box_published"> | ||
published | ||
</span> | ||
<span tal:content="published" property="rnews:datePublished"> | ||
August 16, 2001 at 23:35:59 | ||
</span><tal:sep condition="modified">,</tal:sep> | ||
</span> | ||
|
||
<span class="documentModified" tal:condition="modified"> | ||
<span i18n:translate="box_last_modified"> | ||
last modified | ||
</span> | ||
<span tal:content="modified" property="rnews:dateModified"> | ||
August 16, 2001 at 23:35:59 | ||
</span> | ||
</span> | ||
</tal:dates> | ||
</div> | ||
</header> | ||
|
||
<div tal:replace="structure provider:plone.abovecontentbody" /> | ||
|
||
<div id="content-core" itemprop="articleBody"> | ||
<section> | ||
<article class="microupdate" | ||
data-timestamp="" | ||
itemprop="comment" | ||
itemscope | ||
itemtype="http://schema.org/Comment" | ||
tal:attributes="data-timestamp update/timestamp"> | ||
<div class="microupdate-text" | ||
itemprop="text" | ||
tal:content="structure update/text" /> | ||
</article> | ||
</section> | ||
</div> | ||
|
||
<div tal:replace="structure provider:plone.belowcontentbody" /> | ||
|
||
<div class="microupdate-back"> | ||
<span i18n:translate="" tal:omit-tag="">Extracted from:</span> | ||
<a tal:attributes="href context/absolute_url" | ||
tal:content="context/Title">Liveblog</a> | ||
</div> | ||
</article> | ||
</metal:block> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# -*- coding: utf-8 -*- | ||
from collective.liveblog.testing import INTEGRATION_TESTING | ||
|
||
import unittest | ||
|
||
|
||
class UpgradeBaseTestCase(unittest.TestCase): | ||
|
||
layer = INTEGRATION_TESTING | ||
profile_id = u'collective.liveblog:default' | ||
|
||
def setUp(self): | ||
self.portal = self.layer['portal'] | ||
self.setup = self.portal['portal_setup'] | ||
self.setup.setLastVersionForProfile(self.profile_id, self.from_) | ||
|
||
def _get_upgrade_step_by_title(self, title): | ||
"""Return the upgrade step that matches the title specified.""" | ||
self.setup.setLastVersionForProfile(self.profile_id, self.from_) | ||
upgrades = self.setup.listUpgrades(self.profile_id) | ||
steps = [s for s in upgrades[0] if s['title'] == title] | ||
return steps[0] if steps else None | ||
|
||
def _do_upgrade(self, step): | ||
"""Execute an upgrade step.""" | ||
request = self.layer['request'] | ||
request.form['profile_id'] = self.profile_id | ||
request.form['upgrades'] = [step['id']] | ||
self.setup.manage_doUpgrades(request=request) | ||
|
||
|
||
class To1001TestCase(UpgradeBaseTestCase): | ||
|
||
from_ = '1' | ||
to_ = '2' | ||
|
||
def test_profile_version(self): | ||
version = self.setup.getLastVersionForProfile(self.profile_id)[0] | ||
self.assertEqual(version, self.from_) | ||
|
||
def test_registered_steps(self): | ||
steps = len(self.setup.listUpgrades(self.profile_id)[0]) | ||
self.assertEqual(steps, 1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.