mirror of
https://github.com/ReVanced/revanced-api.git
synced 2026-01-19 09:23:57 +00:00
feat: API Fixes and Adjustments (#23)
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>
This commit is contained in:
committed by
GitHub
parent
1273f9224b
commit
b18097e030
@@ -1,17 +1,17 @@
|
||||
import pytest
|
||||
from sanic import Sanic
|
||||
# import pytest
|
||||
# from sanic import Sanic
|
||||
|
||||
from api.models.appinfo import AppInfoModel
|
||||
# from api.models.appinfo import AppInfoModel
|
||||
|
||||
from config import api_version, apkdl_testing_package
|
||||
# from config import api_version, apkdl_testing_package
|
||||
|
||||
# socials
|
||||
# # socials
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_socials(app: Sanic):
|
||||
_, response = await app.asgi_client.get(
|
||||
f"/{api_version}/app/info/{apkdl_testing_package}"
|
||||
)
|
||||
assert response.status == 200
|
||||
assert AppInfoModel(app_info=response.json["app_info"])
|
||||
# @pytest.mark.asyncio
|
||||
# async def test_socials(app: Sanic):
|
||||
# _, response = await app.asgi_client.get(
|
||||
# f"/{api_version}/app/info/{apkdl_testing_package}"
|
||||
# )
|
||||
# assert response.status == 200
|
||||
# assert AppInfoModel(app_info=response.json["app_info"])
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import pytest
|
||||
from sanic import Sanic
|
||||
|
||||
from api.models.compat import ToolsResponseModel
|
||||
from api.models.compat import ToolsResponseModel, ContributorsResponseModel
|
||||
|
||||
# compatibility layer
|
||||
|
||||
@@ -11,3 +11,12 @@ 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"]]
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user