mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-12 19:49:04 +08:00
fix: unit tests env will need clear too (#11445)
Signed-off-by: yihong0618 <zouzou0208@gmail.com>
This commit is contained in:
parent
4d7cfd0de5
commit
7ff42b1b7a
@ -37,7 +37,11 @@ def test_dify_config_undefined_entry(example_env_file):
|
|||||||
assert config["LOG_LEVEL"] == "INFO"
|
assert config["LOG_LEVEL"] == "INFO"
|
||||||
|
|
||||||
|
|
||||||
|
# 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`.
|
||||||
def test_dify_config(example_env_file):
|
def test_dify_config(example_env_file):
|
||||||
|
# clear system environment variables
|
||||||
|
os.environ.clear()
|
||||||
# load dotenv file with pydantic-settings
|
# load dotenv file with pydantic-settings
|
||||||
config = DifyConfig(_env_file=example_env_file)
|
config = DifyConfig(_env_file=example_env_file)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user