Move ZipWriter from common into web, because that's the only place it's used

This commit is contained in:
Micah Lee 2018-03-08 05:45:07 -08:00
parent 2e31db8543
commit 2e6538b7f8
No known key found for this signature in database
GPG key ID: 403C2657CD994F73
5 changed files with 143 additions and 111 deletions

View file

@ -8,7 +8,7 @@ import tempfile
import pytest
from onionshare import common
from onionshare import common, web
@pytest.fixture
def temp_dir_1024():
@ -64,7 +64,7 @@ def temp_file_1024_delete():
# pytest > 2.9 only needs @pytest.fixture
@pytest.yield_fixture(scope='session')
def custom_zw():
zw = common.ZipWriter(
zw = web.ZipWriter(
zip_filename=common.random_string(4, 6),
processed_size_callback=lambda _: 'custom_callback'
)
@ -76,7 +76,7 @@ def custom_zw():
# pytest > 2.9 only needs @pytest.fixture
@pytest.yield_fixture(scope='session')
def default_zw():
zw = common.ZipWriter()
zw = web.ZipWriter()
yield zw
zw.close()
tmp_dir = os.path.dirname(zw.zip_filename)