COSCUP-ap-demo/tests/test_nodeinfo.py
SouthFox 0f04df1d9a
All checks were successful
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
[test] add nodeinfo tests
2023-07-09 18:06:21 +08:00

15 lines
466 B
Python

#!/usr/bin/env python3
"""Test App nodeinfo"""
def test_wellknow_nodeinfo(mocker, client):
"""Test app well-known nodeinfo ath."""
mocker.patch("demo.config.BASE_URL", "foo")
response = client.get("/.well-known/nodeinfo")
assert response.json["links"][0]["href"] == "foo/nodeinfo/2.0"
def test_nodeinfo(client):
"""Test app nodeinfo."""
response = client.get("/nodeinfo/2.0")
assert response.json["software"]["name"] == "COSCUP-demo"