Back to index

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

List of all members.

Public Member Functions

def afterSetUp
def testStylesheetMoveDown
def testStylesheetMoveDownAtEnd
def testStylesheetMoveUp
def testStylesheetMoveUpAtStart
def testStylesheetMoveIllegalId
def testStylesheetMoveToBottom
def testStylesheetMoveToTop
def testStylesheetMoveBefore
def testStylesheetMoveAfter
def testStylesheetMove

Public Attributes

 tool

Detailed Description

Definition at line 368 of file testCSSRegistry.py.


Member Function Documentation

Definition at line 370 of file testCSSRegistry.py.

00370 
00371     def afterSetUp(self):
00372         self.tool = getattr(self.portal, CSSTOOLNAME)
00373         self.tool.clearResources()

Definition at line 470 of file testCSSRegistry.py.

00470 
00471     def testStylesheetMove(self):
00472         self.tool.registerStylesheet('ham')
00473         self.tool.registerStylesheet('spam')
00474         self.tool.registerStylesheet('eggs')
00475         self.tool.registerStylesheet('bacon')
00476         self.assertEqual(self.tool.getResourceIds(),
00477                          ('ham', 'spam', 'eggs', 'bacon'))
00478         self.tool.moveResource('ham', 2)
00479         self.assertEqual(self.tool.getResourceIds(),
00480                          ('spam', 'eggs', 'ham', 'bacon'))
00481         self.tool.moveResource('bacon', 0)
00482         self.assertEqual(self.tool.getResourceIds(),
00483                          ('bacon', 'spam', 'eggs', 'ham'))
00484 

Definition at line 456 of file testCSSRegistry.py.

00456 
00457     def testStylesheetMoveAfter(self):
00458         self.tool.registerStylesheet('ham')
00459         self.tool.registerStylesheet('spam')
00460         self.tool.registerStylesheet('eggs')
00461         self.tool.registerStylesheet('bacon')
00462         self.assertEqual(self.tool.getResourceIds(),
00463                          ('ham', 'spam', 'eggs', 'bacon'))
00464         self.tool.moveResourceAfter('bacon', 'ham')
00465         self.assertEqual(self.tool.getResourceIds(),
00466                          ('ham', 'bacon', 'spam', 'eggs'))
00467         self.tool.moveResourceAfter('bacon', 'spam')
00468         self.assertEqual(self.tool.getResourceIds(),
00469                          ('ham', 'spam', 'bacon', 'eggs'))

Definition at line 442 of file testCSSRegistry.py.

00442 
00443     def testStylesheetMoveBefore(self):
00444         self.tool.registerStylesheet('ham')
00445         self.tool.registerStylesheet('spam')
00446         self.tool.registerStylesheet('eggs')
00447         self.tool.registerStylesheet('bacon')
00448         self.assertEqual(self.tool.getResourceIds(),
00449                          ('ham', 'spam', 'eggs', 'bacon'))
00450         self.tool.moveResourceBefore('bacon', 'ham')
00451         self.assertEqual(self.tool.getResourceIds(),
00452                          ('bacon', 'ham', 'spam', 'eggs'))
00453         self.tool.moveResourceBefore('bacon', 'eggs')
00454         self.assertEqual(self.tool.getResourceIds(),
00455                          ('ham', 'spam', 'bacon', 'eggs'))

Definition at line 374 of file testCSSRegistry.py.

00374 
00375     def testStylesheetMoveDown(self):
00376         self.tool.registerStylesheet('ham')
00377         self.tool.registerStylesheet('spam')
00378         self.tool.registerStylesheet('eggs')
00379         self.assertEqual(self.tool.getResourceIds(),
00380                          ('ham', 'spam', 'eggs'))
00381         self.tool.moveResourceDown('spam')
00382         self.assertEqual(self.tool.getResourceIds(),
00383                          ('ham', 'eggs', 'spam'))

Definition at line 384 of file testCSSRegistry.py.

00384 
00385     def testStylesheetMoveDownAtEnd(self):
00386         self.tool.registerStylesheet('ham')
00387         self.tool.registerStylesheet('spam')
00388         self.tool.registerStylesheet('eggs')
00389         self.assertEqual(self.tool.getResourceIds(),
00390                          ('ham', 'spam', 'eggs'))
00391         self.tool.moveResourceDown('eggs')
00392         self.assertEqual(self.tool.getResourceIds(),
00393                          ('ham', 'spam', 'eggs'))

Definition at line 414 of file testCSSRegistry.py.

00414 
00415     def testStylesheetMoveIllegalId(self):
00416         self.tool.registerStylesheet('ham')
00417         self.tool.registerStylesheet('spam')
00418         self.tool.registerStylesheet('eggs')
00419         self.assertEqual(self.tool.getResourceIds(),
00420                          ('ham', 'spam', 'eggs'))
00421         self.assertRaises(ValueError, self.tool.moveResourceUp, 'foo')

Definition at line 422 of file testCSSRegistry.py.

00422 
00423     def testStylesheetMoveToBottom(self):
00424         self.tool.registerStylesheet('ham')
00425         self.tool.registerStylesheet('spam')
00426         self.tool.registerStylesheet('eggs')
00427         self.assertEqual(self.tool.getResourceIds(),
00428                          ('ham', 'spam', 'eggs'))
00429         self.tool.moveResourceToBottom('ham')
00430         self.assertEqual(self.tool.getResourceIds(),
00431                          ('spam', 'eggs', 'ham'))

Definition at line 432 of file testCSSRegistry.py.

00432 
00433     def testStylesheetMoveToTop(self):
00434         self.tool.registerStylesheet('ham')
00435         self.tool.registerStylesheet('spam')
00436         self.tool.registerStylesheet('eggs')
00437         self.assertEqual(self.tool.getResourceIds(),
00438                          ('ham', 'spam', 'eggs'))
00439         self.tool.moveResourceToTop('eggs')
00440         self.assertEqual(self.tool.getResourceIds(),
00441                          ('eggs', 'ham', 'spam'))

Definition at line 394 of file testCSSRegistry.py.

00394 
00395     def testStylesheetMoveUp(self):
00396         self.tool.registerStylesheet('ham')
00397         self.tool.registerStylesheet('spam')
00398         self.tool.registerStylesheet('eggs')
00399         self.assertEqual(self.tool.getResourceIds(),
00400                          ('ham', 'spam', 'eggs'))
00401         self.tool.moveResourceUp('spam')
00402         self.assertEqual(self.tool.getResourceIds(),
00403                          ('spam', 'ham', 'eggs'))

Definition at line 404 of file testCSSRegistry.py.

00404 
00405     def testStylesheetMoveUpAtStart(self):
00406         self.tool.registerStylesheet('ham')
00407         self.tool.registerStylesheet('spam')
00408         self.tool.registerStylesheet('eggs')
00409         self.assertEqual(self.tool.getResourceIds(),
00410                          ('ham', 'spam', 'eggs'))
00411         self.tool.moveResourceUp('ham')
00412         self.assertEqual(self.tool.getResourceIds(),
00413                          ('ham', 'spam', 'eggs'))


Member Data Documentation

Definition at line 371 of file testCSSRegistry.py.


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