Back to index

plone3  3.1.7
Public Member Functions | Public Attributes
ResourceRegistries.tests.testKSSRegistry.TestKineticStylesheetMoving Class Reference
Inheritance diagram for ResourceRegistries.tests.testKSSRegistry.TestKineticStylesheetMoving:
Inheritance graph
[legend]
Collaboration diagram for ResourceRegistries.tests.testKSSRegistry.TestKineticStylesheetMoving:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def afterSetUp
def testKineticStylesheetMoveDown
def testKineticStylesheetMoveDownAtEnd
def testKineticStylesheetMoveUp
def testKineticStylesheetMoveUpAtStart
def testKineticStylesheetMoveIllegalId
def testKineticStylesheetMoveToBottom
def testKineticStylesheetMoveToTop
def testKineticStylesheetMoveBefore
def testKineticStylesheetMoveAfter
def testKineticStylesheetMove

Public Attributes

 tool

Detailed Description

Definition at line 289 of file testKSSRegistry.py.


Member Function Documentation

Definition at line 291 of file testKSSRegistry.py.

00291 
00292     def afterSetUp(self):
00293         self.tool = getattr(self.portal, KSSTOOLNAME)
00294         self.tool.clearResources()

Definition at line 391 of file testKSSRegistry.py.

00391 
00392     def testKineticStylesheetMove(self):
00393         self.tool.registerKineticStylesheet('ham')
00394         self.tool.registerKineticStylesheet('spam')
00395         self.tool.registerKineticStylesheet('eggs')
00396         self.tool.registerKineticStylesheet('bacon')
00397         self.assertEqual(self.tool.getResourceIds(),
00398                          ('ham', 'spam', 'eggs', 'bacon'))
00399         self.tool.moveResource('ham', 2)
00400         self.assertEqual(self.tool.getResourceIds(),
00401                          ('spam', 'eggs', 'ham', 'bacon'))
00402         self.tool.moveResource('bacon', 0)
00403         self.assertEqual(self.tool.getResourceIds(),
00404                          ('bacon', 'spam', 'eggs', 'ham'))
00405 

Definition at line 377 of file testKSSRegistry.py.

00377 
00378     def testKineticStylesheetMoveAfter(self):
00379         self.tool.registerKineticStylesheet('ham')
00380         self.tool.registerKineticStylesheet('spam')
00381         self.tool.registerKineticStylesheet('eggs')
00382         self.tool.registerKineticStylesheet('bacon')
00383         self.assertEqual(self.tool.getResourceIds(),
00384                          ('ham', 'spam', 'eggs', 'bacon'))
00385         self.tool.moveResourceAfter('bacon', 'ham')
00386         self.assertEqual(self.tool.getResourceIds(),
00387                          ('ham', 'bacon', 'spam', 'eggs'))
00388         self.tool.moveResourceAfter('bacon', 'spam')
00389         self.assertEqual(self.tool.getResourceIds(),
00390                          ('ham', 'spam', 'bacon', 'eggs'))

Definition at line 363 of file testKSSRegistry.py.

00363 
00364     def testKineticStylesheetMoveBefore(self):
00365         self.tool.registerKineticStylesheet('ham')
00366         self.tool.registerKineticStylesheet('spam')
00367         self.tool.registerKineticStylesheet('eggs')
00368         self.tool.registerKineticStylesheet('bacon')
00369         self.assertEqual(self.tool.getResourceIds(),
00370                          ('ham', 'spam', 'eggs', 'bacon'))
00371         self.tool.moveResourceBefore('bacon', 'ham')
00372         self.assertEqual(self.tool.getResourceIds(),
00373                          ('bacon', 'ham', 'spam', 'eggs'))
00374         self.tool.moveResourceBefore('bacon', 'eggs')
00375         self.assertEqual(self.tool.getResourceIds(),
00376                          ('ham', 'spam', 'bacon', 'eggs'))

Definition at line 295 of file testKSSRegistry.py.

00295 
00296     def testKineticStylesheetMoveDown(self):
00297         self.tool.registerKineticStylesheet('ham')
00298         self.tool.registerKineticStylesheet('spam')
00299         self.tool.registerKineticStylesheet('eggs')
00300         self.assertEqual(self.tool.getResourceIds(),
00301                          ('ham', 'spam', 'eggs'))
00302         self.tool.moveResourceDown('spam')
00303         self.assertEqual(self.tool.getResourceIds(),
00304                          ('ham', 'eggs', 'spam'))

Definition at line 305 of file testKSSRegistry.py.

00305 
00306     def testKineticStylesheetMoveDownAtEnd(self):
00307         self.tool.registerKineticStylesheet('ham')
00308         self.tool.registerKineticStylesheet('spam')
00309         self.tool.registerKineticStylesheet('eggs')
00310         self.assertEqual(self.tool.getResourceIds(),
00311                          ('ham', 'spam', 'eggs'))
00312         self.tool.moveResourceDown('eggs')
00313         self.assertEqual(self.tool.getResourceIds(),
00314                          ('ham', 'spam', 'eggs'))

Definition at line 335 of file testKSSRegistry.py.

00335 
00336     def testKineticStylesheetMoveIllegalId(self):
00337         self.tool.registerKineticStylesheet('ham')
00338         self.tool.registerKineticStylesheet('spam')
00339         self.tool.registerKineticStylesheet('eggs')
00340         self.assertEqual(self.tool.getResourceIds(),
00341                          ('ham', 'spam', 'eggs'))
00342         self.assertRaises(ValueError, self.tool.moveResourceUp, 'foo')

Definition at line 343 of file testKSSRegistry.py.

00343 
00344     def testKineticStylesheetMoveToBottom(self):
00345         self.tool.registerKineticStylesheet('ham')
00346         self.tool.registerKineticStylesheet('spam')
00347         self.tool.registerKineticStylesheet('eggs')
00348         self.assertEqual(self.tool.getResourceIds(),
00349                          ('ham', 'spam', 'eggs'))
00350         self.tool.moveResourceToBottom('ham')
00351         self.assertEqual(self.tool.getResourceIds(),
00352                          ('spam', 'eggs', 'ham'))

Definition at line 353 of file testKSSRegistry.py.

00353 
00354     def testKineticStylesheetMoveToTop(self):
00355         self.tool.registerKineticStylesheet('ham')
00356         self.tool.registerKineticStylesheet('spam')
00357         self.tool.registerKineticStylesheet('eggs')
00358         self.assertEqual(self.tool.getResourceIds(),
00359                          ('ham', 'spam', 'eggs'))
00360         self.tool.moveResourceToTop('eggs')
00361         self.assertEqual(self.tool.getResourceIds(),
00362                          ('eggs', 'ham', 'spam'))

Definition at line 315 of file testKSSRegistry.py.

00315 
00316     def testKineticStylesheetMoveUp(self):
00317         self.tool.registerKineticStylesheet('ham')
00318         self.tool.registerKineticStylesheet('spam')
00319         self.tool.registerKineticStylesheet('eggs')
00320         self.assertEqual(self.tool.getResourceIds(),
00321                          ('ham', 'spam', 'eggs'))
00322         self.tool.moveResourceUp('spam')
00323         self.assertEqual(self.tool.getResourceIds(),
00324                          ('spam', 'ham', 'eggs'))

Definition at line 325 of file testKSSRegistry.py.

00325 
00326     def testKineticStylesheetMoveUpAtStart(self):
00327         self.tool.registerKineticStylesheet('ham')
00328         self.tool.registerKineticStylesheet('spam')
00329         self.tool.registerKineticStylesheet('eggs')
00330         self.assertEqual(self.tool.getResourceIds(),
00331                          ('ham', 'spam', 'eggs'))
00332         self.tool.moveResourceUp('ham')
00333         self.assertEqual(self.tool.getResourceIds(),
00334                          ('ham', 'spam', 'eggs'))


Member Data Documentation

Definition at line 292 of file testKSSRegistry.py.


The documentation for this class was generated from the following file: