tests may pass now w/ burnettk
This commit is contained in:
parent
8e2423628f
commit
ad0996fe72
|
@ -12,4 +12,12 @@ def app() -> Flask:
|
||||||
"""App."""
|
"""App."""
|
||||||
os.environ["FLASK_ENV"] = "testing"
|
os.environ["FLASK_ENV"] = "testing"
|
||||||
app = create_app()
|
app = create_app()
|
||||||
|
|
||||||
|
# NOTE: set this here since nox shoves tests and src code to
|
||||||
|
# different places and this allows us to know exactly where we are at the start
|
||||||
|
app.config["BPMN_SPEC_ABSOLUTE_DIR"] = (
|
||||||
|
os.path.join(os.path.dirname(__file__))
|
||||||
|
+ "/tests/spiff_workflow_webapp/files/bpmn_specs"
|
||||||
|
)
|
||||||
|
|
||||||
return app
|
return app
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
"""__init__.py."""
|
"""__init__.py."""
|
||||||
import os
|
|
||||||
|
|
||||||
from flask.app import Flask
|
from flask.app import Flask
|
||||||
from werkzeug.utils import ImportStringError
|
from werkzeug.utils import ImportStringError
|
||||||
|
|
||||||
|
@ -9,7 +7,6 @@ def setup_config(app: Flask) -> None:
|
||||||
"""Setup_config."""
|
"""Setup_config."""
|
||||||
app.config["SQLALCHEMY_TRACK_MODIFICATIONS"] = False
|
app.config["SQLALCHEMY_TRACK_MODIFICATIONS"] = False
|
||||||
app.config.from_object("spiff_workflow_webapp.config.default")
|
app.config.from_object("spiff_workflow_webapp.config.default")
|
||||||
app.config["PROJECT_ROOT"] = os.path.join(app.root_path, "..", "..")
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
app.config.from_object("spiff_workflow_webapp.config." + app.env)
|
app.config.from_object("spiff_workflow_webapp.config." + app.env)
|
||||||
|
|
|
@ -10,4 +10,3 @@ else:
|
||||||
)
|
)
|
||||||
|
|
||||||
TESTING = True
|
TESTING = True
|
||||||
BPMN_SPEC_DIR = "tests/spiff_workflow_webapp/files/bpmn_specs"
|
|
||||||
|
|
Binary file not shown.
|
@ -34,7 +34,7 @@ def run_process() -> Response:
|
||||||
mimetype="application/json",
|
mimetype="application/json",
|
||||||
)
|
)
|
||||||
|
|
||||||
bpmn_spec_dir = os.path.join(current_app.config["PROJECT_ROOT"], current_app.config["BPMN_SPEC_DIR"])
|
bpmn_spec_dir = current_app.config["BPMN_SPEC_ABSOLUTE_DIR"]
|
||||||
process = "order_product"
|
process = "order_product"
|
||||||
dmn = [
|
dmn = [
|
||||||
os.path.join(bpmn_spec_dir, "product_prices.dmn"),
|
os.path.join(bpmn_spec_dir, "product_prices.dmn"),
|
||||||
|
|
Loading…
Reference in New Issue