mirror of
https://github.com/revanced/revanced-api.git
synced 2025-04-30 22:54:32 +02:00

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
23 lines
651 B
Python
23 lines
651 B
Python
import pytest
|
|
from sanic import Sanic
|
|
|
|
from api.models.compat import ToolsResponseModel, ContributorsResponseModel
|
|
|
|
# compatibility layer
|
|
|
|
|
|
@pytest.mark.asyncio
|
|
async def test_compat_tools(app: Sanic):
|
|
_, response = await app.asgi_client.get(f"/tools")
|
|
assert response.status == 200
|
|
assert ToolsResponseModel(tools=[tool for tool in response.json["tools"]])
|
|
|
|
|
|
@pytest.mark.asyncio
|
|
async def test_compat_contributors(app: Sanic):
|
|
_, response = await app.asgi_client.get(f"/contributors")
|
|
assert response.status == 200
|
|
assert ContributorsResponseModel(
|
|
repositories=[repo for repo in response.json["repositories"]]
|
|
)
|