File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,20 @@ def test_csv(self):
4747 file_data = import_log .get_import_file_as_list (only_header = True )
4848 self .assertIn ('name' , file_data )
4949
50+ def test_ods (self ):
51+ path = os .path .join (
52+ os .path .dirname (__file__ ), 'static' , 'test_import.ods' )
53+ with open (path , 'rb' ) as fp :
54+ import_log = ImportLog .objects .create (
55+ name = "test" ,
56+ user = self .user ,
57+ import_file = File (fp ),
58+ import_setting = self .import_setting ,
59+ import_type = 'N' ,
60+ )
61+ file_data = import_log .get_import_file_as_list (only_header = True )
62+ self .assertIn ('name' , file_data )
63+
5064 def test_import (self ):
5165 """ Make sure we can upload the file and match columns """
5266 import_log_ct_id = ContentType .objects .get_for_model (ImportLog ).id
You can’t perform that action at this time.
0 commit comments