fix create_app import in tests

This commit is contained in:
Dmitry Belyaev 2021-10-07 14:38:38 +03:00
parent fa282b96e0
commit 316cf7e581
Signed by: b4tman
GPG Key ID: 41A00BF15EA7E5F3

View File

@ -2,10 +2,11 @@ import os
from flask import Flask
import pytest
import importlib
import yaml
from flask.testing import FlaskClient
from app.app import create_app
@pytest.fixture
def temp_config(tmpdir) -> str:
@ -43,8 +44,7 @@ def temp_config(tmpdir) -> str:
@pytest.fixture
def flask_app(temp_config) -> Flask:
os.environ['WEBPUB1C_CONFIG'] = temp_config
pub1c = importlib.import_module('run')
return pub1c.app
return create_app()
@pytest.fixture