[CMF-checkins] CVS: CMF/CMFCore/tests - test_FSPythonScript.py:1.1 test_all.py:1.11
Chris Withers
chrisw@nipltd.com
Sun, 10 Feb 2002 09:28:15 -0500
Update of /cvs-repository/CMF/CMFCore/tests
In directory cvs.zope.org:/tmp/cvs-serv11288/CMFCore/tests
Modified Files:
test_all.py
Added Files:
test_FSPythonScript.py
Log Message:
Finally! I can edit FSPythonScripts via FTP and WebDAV with impunity :-)
=== Added File CMF/CMFCore/tests/test_FSPythonScript.py ===
import Zope
from unittest import TestCase, TestSuite, makeSuite, main
from Products.CMFCore.FSPythonScript import FSPythonScript
from test_DirectoryView import skin_path_name
from os.path import join
script_path = join(skin_path_name,'test1.py')
class FSPythonScriptTests( TestCase ):
def test_registerDirectory( self ):
""" Test get_size returns correct value """
script = FSPythonScript('test1', script_path)
self.assertEqual(len(script.read()),script.get_size())
def test_suite():
return TestSuite((
makeSuite(FSPythonScriptTests),
))
def run():
main(defaultTest='test_suite')
if __name__ == '__main__':
run()
=== CMF/CMFCore/tests/test_all.py 1.10 => 1.11 ===
'test_CatalogTool',
'test_DirectoryView',
+ 'test_FSPythonScript'
]:
suite.addTest(
__import__(name,globals(),locals()).test_suite()