[test] add nodeinfo tests
This commit is contained in:
parent
1728fd4f6f
commit
0f04df1d9a
1 changed files with 15 additions and 0 deletions
15
tests/test_nodeinfo.py
Normal file
15
tests/test_nodeinfo.py
Normal file
|
@ -0,0 +1,15 @@
|
|||
#!/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"
|
Loading…
Reference in a new issue