def testIntialize(self): """Test the initialize functionality.""" file_entry = gzip_file_entry.GzipFileEntry(self._resolver_context, self._file_system, self._gzip_path_spec) self.assertNotEqual(file_entry, None)
def testIntialize(self): """Test the __init__ function.""" file_entry = gzip_file_entry.GzipFileEntry(self._resolver_context, self._file_system, self._gzip_path_spec) self.assertIsNotNone(file_entry)
def testSize(self): """Test the size property.""" file_entry = gzip_file_entry.GzipFileEntry(self._resolver_context, self._file_system, self._gzip_path_spec) self.assertIsNotNone(file_entry) self.assertEqual(file_entry.size, 1247)
def testModificationTime(self): """Test the modification_time property.""" file_entry = gzip_file_entry.GzipFileEntry(self._resolver_context, self._file_system, self._gzip_path_spec) self.assertIsNotNone(file_entry) self.assertIsNotNone(file_entry.modification_time)
def GetFileEntryByPathSpec(self, path_spec): """Retrieves a file entry for a path specification. Args: path_spec: a path specification (instance of path.PathSpec). Returns: A file entry (instance of vfs.FileEntry) or None. """ return gzip_file_entry.GzipFileEntry(self._resolver_context, self, path_spec, is_root=True, is_virtual=True)
def GetFileEntryByPathSpec(self, path_spec): """Retrieves a file entry for a path specification. Args: path_spec (PathSpec): path specification. Returns: GzipFileEntry: a file entry or None if not available. """ return gzip_file_entry.GzipFileEntry(self._resolver_context, self, path_spec, is_root=True, is_virtual=True)