test:add unit test for api version config (#21919)
This commit is contained in:
parent
13990f31a1
commit
6663187eca
1 changed files with 4 additions and 0 deletions
|
|
@ -1,6 +1,7 @@
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from flask import Flask
|
from flask import Flask
|
||||||
|
from packaging.version import Version
|
||||||
from yarl import URL
|
from yarl import URL
|
||||||
|
|
||||||
from configs.app_config import DifyConfig
|
from configs.app_config import DifyConfig
|
||||||
|
|
@ -40,6 +41,9 @@ def test_dify_config(monkeypatch):
|
||||||
|
|
||||||
assert config.WORKFLOW_PARALLEL_DEPTH_LIMIT == 3
|
assert config.WORKFLOW_PARALLEL_DEPTH_LIMIT == 3
|
||||||
|
|
||||||
|
# values from pyproject.toml
|
||||||
|
assert Version(config.project.version) >= Version("1.0.0")
|
||||||
|
|
||||||
|
|
||||||
# NOTE: If there is a `.env` file in your Workspace, this test might not succeed as expected.
|
# NOTE: If there is a `.env` file in your Workspace, this test might not succeed as expected.
|
||||||
# This is due to `pymilvus` loading all the variables from the `.env` file into `os.environ`.
|
# This is due to `pymilvus` loading all the variables from the `.env` file into `os.environ`.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue