File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,8 @@ def load_book(self):
2727
2828class ExcelMemoryFileUploadHandler (MemoryFileUploadHandler ):
2929 def file_complete (self , file_size ):
30+ if not self .activated :
31+ return
3032 self .file .seek (0 )
3133 return ExcelMemoryFile (
3234 file = self .file ,
Original file line number Diff line number Diff line change 1- from unittest import TestCase
2- from django .test import Client
1+ from django . test import Client , TestCase
2+ from django .test . utils import override_settings
33import pyexcel as pe
44import pyexcel .ext .xls
55import pyexcel .ext .xlsx
@@ -109,4 +109,9 @@ def test_exchange(self):
109109 sheet .format (int )
110110 array = sheet .to_array ()
111111 assert array == self .data
112- os .unlink (tmp_filename )
112+ os .unlink (tmp_filename )
113+
114+
115+ @override_settings (FILE_UPLOAD_MAX_MEMORY_SIZE = 1 )
116+ class ExcelResponseUsingFileTestCase (ExcelResponseTestCase ):
117+ pass
You can’t perform that action at this time.
0 commit comments