fix create_app import in tests
This commit is contained in:
parent
fa282b96e0
commit
316cf7e581
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user