mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-09-06 20:16:47 +00:00
🐛 fix env var not override dotenv file (#1052)
This commit is contained in:
@ -3,6 +3,7 @@ import os
|
||||
import pytest
|
||||
|
||||
os.environ["CONFIG_FROM_ENV"] = '{"test": "test"}'
|
||||
os.environ["CONFIG_OVERRIDE"] = "new"
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
@ -25,6 +26,7 @@ async def test_init(nonebug_init):
|
||||
|
||||
config = get_driver().config
|
||||
assert config.config_from_env == {"test": "test"}
|
||||
assert config.config_override == "new"
|
||||
assert config.config_from_init == "init"
|
||||
assert config.common_config == "common"
|
||||
|
||||
|
Reference in New Issue
Block a user