コード例 #1
0
 def test02_FolderExporterPostProcess(self):
     """Test folder exporter post processing"""
     e = FolderExporter()
     result = WriterResult()
     result.index_file = '/tmp/file.htm'
     e.postProcess(result)
     self.assertEqual(e.destinationUrl(), '/tmp/file.htm')
コード例 #2
0
 def test02_FolderExporterPostProcess(self):
     """Test folder exporter post processing"""
     e = FolderExporter()
     result = WriterResult()
     result.index_file = '/tmp/file.htm'
     e.postProcess(result)
     self.assertEqual(e.destinationUrl(), '/tmp/file.htm')
コード例 #3
0
    def test03_FolderExporterSaveReadFromProject(self):
        """Test saving and restoring folder exporter settings in project"""
        e = FolderExporter()
        e.folder = '/my_folder'
        e.writeToProject()

        restored = FolderExporter()
        restored.readFromProject()

        self.assertEqual(restored.exportDirectory(), '/my_folder')
コード例 #4
0
    def test05_RegistrySaveReadFromProject(self):
        """ test saving and restoring current exporter in project"""
        e = FolderExporter()
        e.folder = '/my_folder'
        EXPORTER_REGISTRY.writeToProject(e)

        restored = EXPORTER_REGISTRY.createFromProject()
        self.assertEqual(type(restored), FolderExporter)
        self.assertEqual(restored.exportDirectory(), '/my_folder')

        # try with a non-folder exporter
        f = FtpExporter()
        EXPORTER_REGISTRY.writeToProject(f)
        restored = EXPORTER_REGISTRY.createFromProject()
        self.assertEqual(type(restored), FtpExporter)
コード例 #5
0
    def test05_RegistrySaveReadFromProject(self):
        """ test saving and restoring current exporter in project"""
        e = FolderExporter()
        e.folder = '/my_folder'
        EXPORTER_REGISTRY.writeToProject(e)

        restored = EXPORTER_REGISTRY.createFromProject()
        self.assertEqual(type(restored), FolderExporter)
        self.assertEqual(restored.exportDirectory(), '/my_folder')

        # try with a non-folder exporter
        f = FtpExporter()
        EXPORTER_REGISTRY.writeToProject(f)
        restored = EXPORTER_REGISTRY.createFromProject()
        self.assertEqual(type(restored), FtpExporter)
コード例 #6
0
    def test03_FolderExporterSaveReadFromProject(self):
        """Test saving and restoring folder exporter settings in project"""
        e = FolderExporter()
        e.folder = '/my_folder'
        e.writeToProject()

        restored = FolderExporter()
        restored.readFromProject()

        self.assertEqual(restored.exportDirectory(), '/my_folder')
コード例 #7
0
 def test01_FolderExporterDefaultsToTemp(self):
     """Test that folder exporter defaults to a temporary folder"""
     e = FolderExporter()
     self.assertTrue(e.exportDirectory())
コード例 #8
0
 def test01_FolderExporterDefaultsToTemp(self):
     """Test that folder exporter defaults to a temporary folder"""
     e = FolderExporter()
     self.assertTrue(e.exportDirectory())