2022-01-27 22:48:31 +00:00
|
|
|
import pytest
|
2022-01-31 21:59:44 +00:00
|
|
|
import os
|
2022-01-27 22:48:31 +00:00
|
|
|
|
|
|
|
from selenium.webdriver import Chrome
|
|
|
|
from imaginaerraum_door_admin import create_app
|
|
|
|
|
2022-01-31 21:59:44 +00:00
|
|
|
os.environ['APPLICATION_SETTINGS'] = os.getcwd() + '/debug_app_config.py'
|
|
|
|
|
2022-01-27 22:48:31 +00:00
|
|
|
|
|
|
|
@pytest.fixture(scope='session')
|
|
|
|
def app():
|
|
|
|
"""Fixture to launch the webapp"""
|
|
|
|
app = create_app()
|
|
|
|
|
|
|
|
return app
|
|
|
|
|
|
|
|
|
|
|
|
@pytest.fixture
|
|
|
|
def browser():
|
|
|
|
"""Fixture for a selenium browser to access the webapp."""
|
|
|
|
driver = Chrome()
|
|
|
|
driver.implicitly_wait(10)
|
|
|
|
yield driver
|
|
|
|
driver.quit()
|