Merge pull request #926 from mig5/fix_settings_in_web_test

Use a custom Settings object in test_onionshare_web.py, rather than potentially load non-ephemeral settings
This commit is contained in:
Micah Lee 2019-03-10 13:58:11 -07:00 committed by GitHub
commit 1498dfeca0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -41,7 +41,7 @@ RANDOM_STR_REGEX = re.compile(r'^[a-z2-7]+$')
def web_obj(common_obj, mode, num_files=0): def web_obj(common_obj, mode, num_files=0):
""" Creates a Web object, in either share mode or receive mode, ready for testing """ """ Creates a Web object, in either share mode or receive mode, ready for testing """
common_obj.load_settings() common_obj.settings = Settings(common_obj)
strings.load_strings(common_obj) strings.load_strings(common_obj)
web = Web(common_obj, False, mode) web = Web(common_obj, False, mode)
web.generate_slug() web.generate_slug()