Ejemplo n.º 1
0
    def test_save_new_dta_file(self):

        ''' tests saving new DTASelect-filter file using save_new_file
        '''

        self.new_dta_file_path, _ = views_documents.save_new_file(self.dta_filestorage)
        # (not saving 'original_filename' returned from save_new_file)

        self.assertTrue(os.path.exists(self.new_dta_file_path))
Ejemplo n.º 2
0
    def test_original_filename_is_preserved(self):

        ''' test that werkzeug FileStorage.filename is the same as the input
            'original_filename' 
        '''

        _, self.original_filename = views_documents.save_new_file(self.ms1_filestorage)

        self.assertTrue(self.original_filename == secure_filename(self.ms1_filestorage.filename))