Back to index

plone3  3.1.7
Private Member Functions
GenericSetup.tests.common.TarballTester Class Reference
Inheritance diagram for GenericSetup.tests.common.TarballTester:
Inheritance graph
[legend]
Collaboration diagram for GenericSetup.tests.common.TarballTester:
Collaboration graph
[legend]

List of all members.

Private Member Functions

def _verifyTarballContents
def _verifyTarballEntry
def _verifyTarballEntryXML

Detailed Description

Definition at line 113 of file common.py.


Member Function Documentation

def GenericSetup.tests.common.TarballTester._verifyTarballContents (   self,
  fileish,
  toc_list,
  when = None 
) [private]

Definition at line 115 of file common.py.

00115 
00116     def _verifyTarballContents( self, fileish, toc_list, when=None ):
00117 
00118         fileish.seek( 0L )
00119         tarfile = TarFile.open( 'foo.tar.gz', fileobj=fileish, mode='r:gz' )
00120         items = tarfile.getnames()
00121         items.sort()
00122         toc_list.sort()
00123 
00124         self.assertEqual( len( items ), len( toc_list ) )
00125         for i in range( len( items ) ):
00126             self.assertEqual( items[ i ], toc_list[ i ] )
00127 
00128         if when is not None:
00129             for tarinfo in tarfile:
00130                 self.failIf( tarinfo.mtime < when )

Here is the caller graph for this function:

def GenericSetup.tests.common.TarballTester._verifyTarballEntry (   self,
  fileish,
  entry_name,
  data 
) [private]

Definition at line 131 of file common.py.

00131 
00132     def _verifyTarballEntry( self, fileish, entry_name, data ):
00133 
00134         fileish.seek( 0L )
00135         tarfile = TarFile.open( 'foo.tar.gz', fileobj=fileish, mode='r:gz' )
00136         extract = tarfile.extractfile( entry_name )
00137         found = extract.read()
00138         self.assertEqual( found, data )

Here is the caller graph for this function:

def GenericSetup.tests.common.TarballTester._verifyTarballEntryXML (   self,
  fileish,
  entry_name,
  data 
) [private]

Definition at line 139 of file common.py.

00139 
00140     def _verifyTarballEntryXML( self, fileish, entry_name, data ):
00141 
00142         fileish.seek( 0L )
00143         tarfile = TarFile.open( 'foo.tar.gz', fileobj=fileish, mode='r:gz' )
00144         extract = tarfile.extractfile( entry_name )
00145         found = extract.read()
00146         self._compareDOM( found, data )
00147 

Here is the call graph for this function:

Here is the caller graph for this function:


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