@@ -92,7 +92,7 @@ def get_data(self):
9292
9393class TestZimCreator (unittest .TestCase ):
9494 def setUp (self ):
95- self .test_zim_file_path = "/opt /python-libzim/tests/kiwix-test"
95+ self .test_zim_file_path = "/tmp /python-libzim/tests/kiwix-test"
9696
9797 # Test article
9898 self .test_article = ZimTestArticle ()
@@ -113,14 +113,15 @@ def test_write_article(self):
113113 zim_creator .add_article (self .test_article )
114114 # Set mandatory metadata
115115 zim_creator .update_metadata (creator = 'python-libzim' ,description = 'Created in python' ,name = 'Hola' ,publisher = 'Monadical' ,title = 'Test Zim' )
116- zim_creator .finalize ()
116+ zim_creator .close ()
117117
118118 def test_article_metadata (self ):
119119 import uuid
120120 rnd_str = str (uuid .uuid1 ())
121121 zim_creator = ZimCreator (self .test_zim_file_path + '-' + rnd_str + '.zim' ,main_page = "welcome" ,index_language = "eng" , min_chunk_size = 2048 )
122122 zim_creator .update_metadata (** TEST_METADATA )
123123 self .assertEqual (zim_creator ._metadata , TEST_METADATA )
124+ zim_creator .close ()
124125
125126 def test_check_mandatory_metadata (self ):
126127 import uuid
@@ -129,6 +130,7 @@ def test_check_mandatory_metadata(self):
129130 self .assertFalse (zim_creator .mandatory_metadata_ok ())
130131 zim_creator .update_metadata (creator = 'python-libzim' ,description = 'Created in python' ,name = 'Hola' ,publisher = 'Monadical' ,title = 'Test Zim' )
131132 self .assertTrue (zim_creator .mandatory_metadata_ok ())
133+ zim_creator .close ()
132134
133135
134136
0 commit comments