Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #73 from plone/python3-configparser-multidict-fix
fix multidict feature for python 3
- Loading branch information
Showing
4 changed files
with
53 additions
and
22 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# -*- coding: utf-8 -*- | ||
import unittest | ||
|
||
from plone.app.blocks.resource import getLayoutsFromResources | ||
from plone.app.blocks.testing import BLOCKS_FUNCTIONAL_TESTING | ||
from plone.app.blocks.interfaces import SITE_LAYOUT_MANIFEST_FORMAT | ||
from plone.app.blocks.interfaces import CONTENT_LAYOUT_MANIFEST_FORMAT | ||
|
||
|
||
class TestResource(unittest.TestCase): | ||
|
||
layer = BLOCKS_FUNCTIONAL_TESTING | ||
|
||
def setUp(self): | ||
self.portal = self.layer['portal'] | ||
|
||
def test_contentlayout_manifest(self): | ||
layouts = getLayoutsFromResources(CONTENT_LAYOUT_MANIFEST_FORMAT) | ||
self.assertTrue('testlayout1/content.html' in layouts) | ||
self.assertTrue('testlayout2/mylayout.html' in layouts) | ||
self.assertTrue('testlayout2/mylayout2.html' in layouts) | ||
|
||
self.assertTrue(layouts['testlayout1/content.html']['title'] == 'Testlayout1') # noqa | ||
self.assertTrue(layouts['testlayout2/mylayout.html']['title'] == 'My content layout') # noqa | ||
self.assertTrue(layouts['testlayout2/mylayout2.html']['title'] == 'My content layout 2') # noqa | ||
|
||
def test_sitelayout_manifest(self): | ||
layouts = getLayoutsFromResources(SITE_LAYOUT_MANIFEST_FORMAT) | ||
self.assertTrue('testlayout1/site.html' in layouts) | ||
self.assertTrue('testlayout2/mylayout.html' in layouts) | ||
self.assertTrue('testlayout2/mylayout2.html' in layouts) | ||
|
||
self.assertTrue(layouts['testlayout1/site.html']['title'] == 'Testlayout1') # noqa | ||
self.assertTrue(layouts['testlayout2/mylayout.html']['title'] == 'My site layout') # noqa | ||
self.assertTrue(layouts['testlayout2/mylayout2.html']['title'] == 'My site layout 2') # noqa |
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