285 Commits

Author SHA1 Message Date
felinae98
c3a764581e
👷 use pytest-xdist to accelerate test (#186)
* 👷 use pytest-xdist to accelerate test

*  mark flaky

* test(mcbbsnews): 删除重复测试,为测试添加flaky

---------

Co-authored-by: hemengyang <hmy0119@gmail.com>
Co-authored-by: AzideCupric <rukuy@qq.com>
2023-03-03 17:16:15 +08:00
felinae98
0201d5b316
⬆️ 升级至 NoneBug 0.3
* 🚧 第一次尝试 50/82

* 62/82 调整了清除数据库的位置

* 🚧 pytest-mock

* 🚧 fix test_send

* 🚧 intruduce app request

* 🚧 close and remove tinydb after each test

* 🚧 clean ScheduleTimeWeight table

* 🚧 reload http module to test proxy

*  合并 main 的代码

* 🚧 在每次测试结束后关闭browser

* 🧑‍💻 在mcbbsnews渲染异常时添加logger

---------

Co-authored-by: hemengyang <hmy0119@gmail.com>
Co-authored-by: Azide <rukuy@qq.com>
2023-03-03 15:12:25 +08:00
AzideCupric
d7e684e8e5
💄 调整订阅回复内容结构以优化群内订阅体验 (#198)
style(admin-page): 为`后台管理`命令添加别名

test: 调整相关测试的文本
2023-02-18 19:51:19 +08:00
felinae98
64eb427c51
♻️ refactor send logic (#185) 2023-02-05 23:36:21 +08:00
AzideCupric
7fa31b6060
♻️ 使用更加简约的方法生成mcbbsnews的推送,修改测试用例 (#170)
* change(mcbbsnews):使用更加简约的方法生成mcbbsnews的推送,修改测试用例

test(mcbbsnews):添加测试函数小工具

change(mcbbsnews):优化代码

test(mcbbsnews):调整测试

test(mcbbsnews):完善细节部分

fix(mcbbsnews):修改traceback的import位置

test fix(mcbbsnews):删除错误传参

* fix(mcbbsnews): 更新过时的category名称

feat(platform): 添加新的异常(CategoryNotRecognize), 用以区别已知但不支持的category(CategoryNotSupport)和未知的新增category(CategoryNotRecognize)

chore: 为各处的CategoryNotRecognize和CategoryNotSupport添加异常描述

test(mcbbsnews): 更新测试用文件的过时category名称
2023-02-05 17:09:31 +08:00
AzideCupric
2ac6f00e1b
👷 添加打上test-render的标签后进行带render标记测试的功能 (#176)
* feat(workflow pytest): 添加打上test-render的标签后进行带render标记测试的功能

fix(workflow pytest): 将env变量变成直接的表达式

fix(test): 删除重复的测试,补充assert

👷 change poetry install action

* ci(workflow): 将触发 all-test 测试的标签更名从 test-render 更名为 all-test
ci(codecov): 为 smoke-test 和 all-test 设置不同的 codecov target
2023-02-02 20:54:22 +08:00
uy/sun
bec252c48c
多机器人支持 (#179)
* 维护一个群号和QQ号与机器人实例的表

* 随机获取一个对应的机器人

* 获取所有机器人所在群的并集

* 监听到相关事件的时候刷新整个缓存

* 在发送错误后自动刷新缓存

* 合并相同类型的函数

* 添加测试
2023-01-31 21:04:00 +08:00
uy/sun
8da8f66fcf
💥 适配最新的 DataStore 插件,并切换模型为 SQLModel (#178)
* 使用 SQLModel

* 处理数据库迁移

* 与之前的模型相匹配

* sqlmodel 和 sqlalchemy 的导入移入测试函数内

并且使用 init_db 且测试前加载插件

* 重命名 alembic_version 表之前先检查是否存在且 version_num 属于插件

* 降级应该是把名称重新命名回去而不是删掉

* 不再设置 arbitrary_types_allowed 为 True
2023-01-30 22:52:11 +08:00
felinae98
410cac1af3 add flaky flag for send with queue 2022-12-23 22:43:55 +08:00
felinae98
0d73d74287 fix test 2022-11-28 17:36:03 +08:00
felinae98
bd679914eb add context to log http error 2022-11-24 14:12:11 +08:00
AzideCupric
f6e7e95d1e fix(bilibili-live): 修正bilibili-live与bilibili-bangumi中过时的api
fix(bilibili-live): 修改另一个过时api

test(bilibili-live):调整bilibili-live测试文件

test(bilibili-bangumi):调整测试用的api
2022-11-23 20:56:52 +08:00
felinae98
2730bd0e62 add pic merge test back 2022-11-22 22:30:40 +08:00
felinae98
e249a8d685 🐛 download weibo pics in parse 2022-11-22 22:11:30 +08:00
felinae98
43e368a734
chore: skip pic merge test (#141) 2022-11-14 17:15:17 +08:00
AzideCupric
e14fd5bfd7
更换哔哩哔哩直播使用的api,添加直播间标题修改时推送直播间的功能 (#128)
* feat(bililive):调整bililive所使用的api与推送消息内容

* feat(bililive):调整功能的实现细节

* test(bililive): 初步完善相关测试

* docs(bililive): 补充文档相关

* change(bililive): 将使用修改配置项以调整订阅的方式调整为使用category

* test(bililive): 调整测试,扩大测试范围

* change(bililive):调整Bilibili-live内部的代码实现

* test(bililive):修正测试

* delete(bililive):删除用来测试功能性的临时文件

* change(bililive): 调整代码
2022-10-19 23:49:02 +08:00
felinae98
57c1e504ce
fix platform store init error 2022-10-17 19:59:07 +08:00
felinae98
74b5074f04
inject http client to scheduler 2022-10-16 20:48:14 +08:00
felinae98
0c8a967654
update scheduler api 2022-10-15 00:41:55 +08:00
felinae98
dbda95c0c9
fixup! use deprecation marker for legacy db
fix test
2022-10-10 22:53:29 +08:00
felinae98
f6e392e8db
add dedup for data migration 2022-10-09 21:25:11 +08:00
Azide
0dc4095c5f
fix(test): 修改CustomPost部分的测试深度 2022-10-09 19:45:56 +08:00
pre-commit-ci[bot]
1543ba21d2
auto fix by pre-commit hooks 2022-10-09 19:45:56 +08:00
felinae98
ebcf1cc300
fix: handle subscibe dup exception 2022-10-09 19:45:55 +08:00
felinae98
317b9fbaa3
fix test 2022-10-07 17:37:54 +08:00
felinae98
5abf8fb2a0
Merge remote-tracking branch 'origin/main' into next 2022-10-07 17:25:18 +08:00
felinae98
c059feba9c
fix test 2022-10-07 17:10:56 +08:00
felinae98
88e3d4de12
fixup! feat: add temp client for bilibili
fix bug
2022-10-04 15:45:00 +08:00
felinae98
0a4fd60e7a
fixup! feat: add temp client for bilibili
fix bug
2022-10-04 15:45:00 +08:00
felinae98
22f6796b33
Merge branch 'main' into next 2022-09-24 09:57:59 +08:00
Azide
8e315d53d3 fix test:修改了订阅过程中bot的回复内容并调整单元测试 2022-09-12 02:33:49 +08:00
Azide
4177fd149a feat (issue#67):添加屏蔽特定tag的功能 2022-09-02 02:48:11 +08:00
Azide
945f00f531 添加测试 2022-09-01 01:59:46 +08:00
felinae98
5b74850715
finish bilibili-bangumi 2022-08-04 23:06:38 +08:00
felinae98
6e801a1624
Merge branch 'main' into next 2022-07-23 16:03:48 +08:00
Azide
28c73f2fba Merge remote-tracking branch 'upstream/main' into feat/custom-post 2022-07-10 12:52:00 +08:00
Azide
a1e246e1b4 test(fix):为不同的平台返回不同的hash 2022-07-06 21:07:07 +08:00
Azide
2a7325a3d0 test(fix):调整测试 2022-07-05 23:06:10 +08:00
Azide
864b1e4d83 test(fix):向test中添加了图片的mock 2022-07-05 22:55:32 +08:00
Azide
6da77e2404 feat:基本完善了custom-post 2022-07-05 22:11:07 +08:00
Azide
6a04e9345d 添加custom-post初步测试 2022-07-05 12:54:35 +08:00
felinae98
9fe98ec6bb
Merge branch 'main' into next 2022-06-09 00:44:48 +08:00
felinae98
b47995a09c
fix bug, add test case 2022-06-09 00:42:14 +08:00
Azide
b19137fcf6 fix:从main分支cherry-pick新的test_mcbbsnews 2022-06-06 15:35:26 +08:00
felinae98
95ef3bd85f
fix test 2022-06-06 10:31:32 +08:00
felinae98
50b46c5f03
fix test 2022-06-06 01:27:25 +08:00
felinae98
43490639c1
Merge branch 'next' into feat/db 2022-06-06 00:42:48 +08:00
felinae98
9fa97704b0
finish new scheduler 2022-06-06 00:22:18 +08:00
felinae98
1f074b1045
Merge branch 'main' into next 2022-06-05 16:48:40 +08:00
felinae98
331d0f6101
update 2022-06-05 16:45:35 +08:00