[CMF-checkins] CVS: CMF/CMFDefault/tests - test_Document.py:1.28.16.2

Yvo Schubbe schubbe@web.de
Tue, 15 Jul 2003 07:31:20 -0400


Update of /cvs-repository/CMF/CMFDefault/tests
In directory cvs.zope.org:/tmp/cvs-serv32502/CMFDefault/tests

Modified Files:
      Tag: yuppie-collector168-redo-branch
	test_Document.py 
Log Message:
some cleanup:
- replaced apply() with direct call
- replaced 'dict' and 'file' variable names

=== CMF/CMFDefault/tests/test_Document.py 1.28.16.1 => 1.28.16.2 ===
--- CMF/CMFDefault/tests/test_Document.py:1.28.16.1	Sun Jul 13 11:50:01 2003
+++ CMF/CMFDefault/tests/test_Document.py	Tue Jul 15 07:31:14 2003
@@ -129,8 +129,8 @@
         body = '<ul>\n%s\n</ul>' % '\n'.join(s)
         html = HTML_TEMPLATE % {'title': 'big document',
                                 'body': body}
-        file = StringIO( html )
-        d.edit(text_format='html', text='', file=file)
+        _file = StringIO( html )
+        d.edit(text_format='html', text='', file=_file)
         self.assertEqual( d.CookedBody(), body )
         
     def test_plain_text(self):
@@ -320,7 +320,7 @@
         ttool = site._setObject( 'portal_types', TypesTool() )
         fti = FTIDATA_CMF15[0].copy()
         del fti['id']
-        ttool._setObject( 'Document', apply( FTI, ('Document',), fti) )
+        ttool._setObject( 'Document', FTI('Document', **fti) )
 
         zpt = site._setObject( 'source_html',
                                ZopePageTemplate('source_html') )
@@ -329,8 +329,8 @@
             dir = dir[:-15]
         else:
             dir = dir[:-6]
-        file = join(dir, 'skins', 'zpt_content', 'source_html.pt')
-        data = open(file, 'r').read()
+        _file = join(dir, 'skins', 'zpt_content', 'source_html.pt')
+        data = open(_file, 'r').read()
         zpt.write(data)
 
         d = site._setObject( 'foo', Document('foo') )