Back to index

plone3  3.1.7
Public Member Functions | Private Member Functions
CMFCore.tests.test_FSPythonScript.CustomizedPythonScriptTests Class Reference

List of all members.

Public Member Functions

def test_write_leaves_original_source
def test_getDiff

Private Member Functions

def _getTargetClass
def _makeOne

Detailed Description

Definition at line 255 of file

Member Function Documentation

Definition at line 257 of file

00258     def _getTargetClass(self):
00259         from Products.CMFCore.FSPythonScript import CustomizedPythonScript
00260         return CustomizedPythonScript

Definition at line 261 of file

00262     def _makeOne(self, id, text):
00263         return self._getTargetClass()(id, text)

Here is the call graph for this function:

Definition at line 272 of file

00273     def test_getDiff(self):
00274         cps = self._makeOne('cps', _ORIGINAL_TEXT)
00275         self.assertEqual(len(list(cps.getDiff())), 0)
00277         cps.write(_REPLACEMENT_TEXT)
00278         self.assertEqual(list(cps.getDiff()), _DIFF_TEXT.splitlines())

Here is the call graph for this function:

Definition at line 264 of file

00265     def test_write_leaves_original_source(self):
00266         cps = self._makeOne('cps', _ORIGINAL_TEXT)
00267         self.assertEqual(, _ORIGINAL_TEXT)
00268         self.assertEqual(cps.original_source, _ORIGINAL_TEXT)
00269         cps.write(_REPLACEMENT_TEXT)
00270         self.assertEqual(, _REPLACEMENT_TEXT)
00271         self.assertEqual(cps.original_source, _ORIGINAL_TEXT)

Here is the call graph for this function:

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