forked from plone/plone.app.tiles
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Get rid of tile book-keeping. Nothing was using this, and it's an unn…
…ecessary annotation write. svn path=/plone.app.tiles/trunk/; revision=44802
- Loading branch information
Showing
10 changed files
with
281 additions
and
576 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
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 |
---|---|---|
@@ -1,6 +1,7 @@ | ||
<metadata> | ||
<version>1</version> | ||
<dependencies> | ||
<dependency>profile-plone.app.tiles:default</dependency> | ||
<dependency>profile-plone.app.drafts:default</dependency> | ||
</dependencies> | ||
</metadata> |
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,51 @@ | ||
from zope.component import getUtility | ||
from zope.component import provideUtility | ||
|
||
from plone.app.testing import PloneSandboxLayer | ||
from plone.app.testing import PLONE_FIXTURE | ||
from plone.app.testing import IntegrationTesting | ||
from plone.app.testing import FunctionalTesting | ||
from plone.app.testing import applyProfile | ||
|
||
from zope.configuration import xmlconfig | ||
|
||
class PloneAppTiles(PloneSandboxLayer): | ||
|
||
defaultBases = (PLONE_FIXTURE,) | ||
|
||
def setUpZope(self, app, configurationContext): | ||
# Load ZCML | ||
import plone.app.tiles | ||
xmlconfig.file('configure.zcml', plone.app.tiles, context=configurationContext) | ||
xmlconfig.file('demo.zcml', plone.app.tiles, context=configurationContext) | ||
|
||
def setUpPloneSite(self, portal): | ||
applyProfile(portal, 'plone.app.tiles:default') | ||
|
||
# Temporarily set up a more predictable UUID generator so that we can | ||
# rely on the uuids in tests | ||
|
||
def testSetUp(self): | ||
from plone.uuid.interfaces import IUUIDGenerator | ||
|
||
class FauxUUIDGenerator(object): | ||
|
||
counter = 0 | ||
|
||
def __call__(self): | ||
self.counter += 1 | ||
return 'tile-%d' % self.counter | ||
|
||
self._uuidGenerator = getUtility(IUUIDGenerator) | ||
|
||
provideUtility(FauxUUIDGenerator(), provides=IUUIDGenerator) | ||
|
||
def testTearDown(self): | ||
from plone.uuid.interfaces import IUUIDGenerator | ||
provideUtility(self._uuidGenerator, provides=IUUIDGenerator) | ||
|
||
PLONE_APP_TILES_FIXTURE = PloneAppTiles() | ||
PLONE_APP_TILES_INTEGRATION_TESTING = \ | ||
IntegrationTesting(bases=(PLONE_APP_TILES_FIXTURE,), name="plone.app.tiles:Integration") | ||
PLONE_APP_TILES_FUNCTIONAL_TESTING = \ | ||
FunctionalTesting(bases=(PLONE_APP_TILES_FIXTURE,), name="plone.app.tiles:Functional") |
Oops, something went wrong.