Move GUI tests into tests/ dir and fix conftest related stuff so everything loads what it needs and passes

This commit is contained in:
Miguel Jacq 2018-10-13 10:35:09 +11:00
parent 2a00656fd6
commit e3459a5136
31 changed files with 25 additions and 189 deletions

View file

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