mirror of
https://github.com/suyiiyii/nonebot-bison.git
synced 2025-06-07 12:23:00 +08:00
22 lines
523 B
Python
22 lines
523 B
Python
import pytest
|
|
import respx
|
|
from httpx import Response
|
|
from nonebug.app import App
|
|
|
|
from .utils import get_file, get_json
|
|
|
|
|
|
@pytest.fixture
|
|
def mcbbsnews(app: App):
|
|
from nonebot_bison.platform import platform_manager
|
|
|
|
return platform_manager['mcbbsnews']
|
|
|
|
@pytest.fixture(scope="module")
|
|
def raw_post_list():
|
|
return get_json('mcbbsnews_raw_post_list.json')
|
|
|
|
@pytest.mark.asyncio
|
|
async def test_javanews_parser(mcbbsnews,raw_post_list):
|
|
post = await mcbbsnews.parse(raw_post_list)
|
|
assert post.text=='' |