summaryrefslogtreecommitdiff
path: root/test/conftest.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/conftest.py')
-rw-r--r--test/conftest.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/conftest.py b/test/conftest.py
new file mode 100644
index 0000000..5f7c004
--- /dev/null
+++ b/test/conftest.py
@@ -0,0 +1,21 @@
+import pytest
+
+import nonebot
+from nonebot.adapters.onebot.v11 import Adapter as OnebotV11Adapter
+
+from nonebug import NONEBOT_INIT_KWARGS
+
+
+def pytest_configure(config: pytest.Config):
+ config.stash[NONEBOT_INIT_KWARGS] = {
+ "superusers": {"1145141919"},
+ "command_start": {""},
+ }
+
+
[email protected](scope="session", autouse=True)
+def load_bot(nonebug_init: None):
+ driver = nonebot.get_driver()
+ driver.register_adapter(OnebotV11Adapter)
+
+ nonebot.load_plugins("ATRI/plugins")