Back to index

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

List of all members.

Public Member Functions

def afterSetUp
def testScriptMoveDown
def testScriptMoveDownAtEnd
def testScriptMoveUp
def testScriptMoveUpAtStart
def testScriptMoveIllegalId
def testScriptMoveToBottom
def testScriptMoveToTop
def testScriptMoveBefore
def testScriptMoveAfter
def testScriptMove

Public Attributes

 tool

Detailed Description

Definition at line 297 of file testJSRegistry.py.


Member Function Documentation

Definition at line 299 of file testJSRegistry.py.

00299 
00300     def afterSetUp(self):
00301         self.tool = getattr(self.portal, JSTOOLNAME)
00302         self.tool.clearResources()

Definition at line 393 of file testJSRegistry.py.

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

Definition at line 382 of file testJSRegistry.py.

00382 
00383     def testScriptMoveAfter(self):
00384         self.tool.registerScript('ham')
00385         self.tool.registerScript('spam')
00386         self.tool.registerScript('eggs')
00387         self.tool.registerScript('bacon')
00388         self.assertEqual(self.tool.getResourceIds(),
00389                          ('ham', 'spam', 'eggs', 'bacon'))
00390         self.tool.moveResourceAfter('bacon', 'ham')
00391         self.assertEqual(self.tool.getResourceIds(),
00392                          ('ham', 'bacon', 'spam', 'eggs'))

Definition at line 371 of file testJSRegistry.py.

00371 
00372     def testScriptMoveBefore(self):
00373         self.tool.registerScript('ham')
00374         self.tool.registerScript('spam')
00375         self.tool.registerScript('eggs')
00376         self.tool.registerScript('bacon')
00377         self.assertEqual(self.tool.getResourceIds(),
00378                          ('ham', 'spam', 'eggs', 'bacon'))
00379         self.tool.moveResourceBefore('bacon', 'ham')
00380         self.assertEqual(self.tool.getResourceIds(),
00381                          ('bacon', 'ham', 'spam', 'eggs'))

Definition at line 303 of file testJSRegistry.py.

00303 
00304     def testScriptMoveDown(self):
00305         self.tool.registerScript('ham')
00306         self.tool.registerScript('spam')
00307         self.tool.registerScript('eggs')
00308         self.assertEqual(self.tool.getResourceIds(),
00309                          ('ham', 'spam', 'eggs'))
00310         self.tool.moveResourceDown('ham')
00311         self.assertEqual(self.tool.getResourceIds(),
00312                          ('spam', 'ham', 'eggs'))

Definition at line 313 of file testJSRegistry.py.

00313 
00314     def testScriptMoveDownAtEnd(self):
00315         self.tool.registerScript('ham')
00316         self.tool.registerScript('spam')
00317         self.tool.registerScript('eggs')
00318         self.assertEqual(self.tool.getResourceIds(),
00319                          ('ham', 'spam', 'eggs'))
00320         self.tool.moveResourceDown('eggs')
00321         self.assertEqual(self.tool.getResourceIds(),
00322                          ('ham', 'spam', 'eggs'))

Definition at line 343 of file testJSRegistry.py.

00343 
00344     def testScriptMoveIllegalId(self):
00345         self.tool.registerScript('ham')
00346         self.tool.registerScript('spam')
00347         self.tool.registerScript('eggs')
00348         self.assertEqual(self.tool.getResourceIds(),
00349                          ('ham', 'spam', 'eggs'))
00350         self.assertRaises(ValueError, self.tool.moveResourceUp, 'foo')

Definition at line 351 of file testJSRegistry.py.

00351 
00352     def testScriptMoveToBottom(self):
00353         self.tool.registerScript('ham')
00354         self.tool.registerScript('spam')
00355         self.tool.registerScript('eggs')
00356         self.assertEqual(self.tool.getResourceIds(),
00357                          ('ham', 'spam', 'eggs'))
00358         self.tool.moveResourceToBottom('ham')
00359         self.assertEqual(self.tool.getResourceIds(),
00360                          ('spam', 'eggs', 'ham'))

Definition at line 361 of file testJSRegistry.py.

00361 
00362     def testScriptMoveToTop(self):
00363         self.tool.registerScript('ham')
00364         self.tool.registerScript('spam')
00365         self.tool.registerScript('eggs')
00366         self.assertEqual(self.tool.getResourceIds(),
00367                          ('ham', 'spam', 'eggs'))
00368         self.tool.moveResourceToTop('eggs')
00369         self.assertEqual(self.tool.getResourceIds(),
00370                          ('eggs', 'ham', 'spam'))

Definition at line 323 of file testJSRegistry.py.

00323 
00324     def testScriptMoveUp(self):
00325         self.tool.registerScript('ham')
00326         self.tool.registerScript('spam')
00327         self.tool.registerScript('eggs')
00328         self.assertEqual(self.tool.getResourceIds(),
00329                          ('ham', 'spam', 'eggs'))
00330         self.tool.moveResourceUp('spam')
00331         self.assertEqual(self.tool.getResourceIds(),
00332                          ('spam', 'ham', 'eggs'))

Definition at line 333 of file testJSRegistry.py.

00333 
00334     def testScriptMoveUpAtStart(self):
00335         self.tool.registerScript('ham')
00336         self.tool.registerScript('spam')
00337         self.tool.registerScript('eggs')
00338         self.assertEqual(self.tool.getResourceIds(),
00339                          ('ham', 'spam', 'eggs'))
00340         self.tool.moveResourceUp('ham')
00341         self.assertEqual(self.tool.getResourceIds(),
00342                          ('ham', 'spam', 'eggs'))


Member Data Documentation

Definition at line 300 of file testJSRegistry.py.


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