Fix tests after refactoring Common

This commit is contained in:
Micah Lee 2018-03-13 02:22:26 -07:00
parent 50409167d4
commit c2fecf8aa4
No known key found for this signature in database
GPG key ID: 403C2657CD994F73
7 changed files with 73 additions and 79 deletions

View file

@ -29,7 +29,7 @@ import zipfile
import pytest
from onionshare import common
from onionshare.common import Common
DEFAULT_ZW_FILENAME_REGEX = re.compile(r'^onionshare_[a-z2-7]{6}.zip$')
RANDOM_STR_REGEX = re.compile(r'^[a-z2-7]+$')
@ -75,7 +75,7 @@ class TestZipWriterDefault:
class TestZipWriterCustom:
@pytest.mark.parametrize('test_input', (
common.random_string(
Common.random_string(
random.randint(2, 50),
random.choice((None, random.randint(2, 50)))
) for _ in range(50)