Back to index

plone3  3.1.7
Public Member Functions | Public Attributes
CMFPlone.tests.testCSSandJSRegistry.TestJSRegistry Class Reference
Inheritance diagram for CMFPlone.tests.testCSSandJSRegistry.TestJSRegistry:
Inheritance graph
[legend]
Collaboration diagram for CMFPlone.tests.testCSSandJSRegistry.TestJSRegistry:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def afterSetUp
def testToolExists
def testDefaultJSIsInstalled
def testJSIsInsertedInPage
def setRequestMethod
def getAuthenticator
def setupAuthenticator

Public Attributes

 tool

Detailed Description

Definition at line 35 of file testCSSandJSRegistry.py.


Member Function Documentation

Definition at line 37 of file testCSSandJSRegistry.py.

00037 
00038     def afterSetUp(self):
00039         self.tool = getToolByName(self.portal, JSTOOLNAME)

Definition at line 30 of file PloneTestCase.py.

00030 
00031     def getAuthenticator(self):
00032         tag = AuthenticatorView('context', 'request').authenticator()
00033         pattern = '<input .*name="(\w+)".*value="(\w+)"'
00034         return match(pattern, tag).groups()

Here is the call graph for this function:

Here is the caller graph for this function:

def CMFPlone.tests.PloneTestCase.PloneTestCase.setRequestMethod (   self,
  method 
) [inherited]
This is a stub now, but in case you want to try
   something fancy on Your Branch (tm), put it here.

Definition at line 26 of file PloneTestCase.py.

00026 
00027     def setRequestMethod(self, method):
00028         self.app.REQUEST.set('REQUEST_METHOD', method)
00029         self.app.REQUEST.method = method

Here is the caller graph for this function:

Definition at line 35 of file PloneTestCase.py.

00035 
00036     def setupAuthenticator(self):
00037         name, token = self.getAuthenticator()
00038         self.app.REQUEST.form[name] = token
00039 

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 43 of file testCSSandJSRegistry.py.

00043 
00044     def testDefaultJSIsInstalled(self):
00045         installedScriptIds = self.tool.getResourceIds()
00046         expected = [
00047              'calendar_formfield.js',
00048              'calendarpopup.js',
00049              'collapsiblesections.js',
00050              'first_input_focus.js',
00051              'highlightsearchterms.js',
00052              'mark_special_links.js',
00053              'select_all.js',
00054              'styleswitcher.js',
00055              'livesearch.js',
00056              'table_sorter.js',
00057              'dropdown.js',
00058              'dragdropreorder.js',
00059              'cssQuery.js',
00060              'cookie_functions.js',
00061              'nodeutilities.js',
00062              'plone_javascript_variables.js',
00063              'register_function.js', 
00064              'formUnload.js',
00065              'formsubmithelpers.js',
00066              'form_tabbing.js']
00067         for e in expected:
00068             self.failUnless(e in installedScriptIds, e)

Definition at line 69 of file testCSSandJSRegistry.py.

00069 
00070     def testJSIsInsertedInPage(self):
00071         page = self.portal.index_html()
00072         self.failUnless("" in page)
00073 

Definition at line 40 of file testCSSandJSRegistry.py.

00040 
00041     def testToolExists(self):
00042         self.failUnless(JSTOOLNAME in self.portal.objectIds())


Member Data Documentation

Definition at line 38 of file testCSSandJSRegistry.py.


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