feat(api): Prepare API for version 2
This commit is contained in:
parent
668d743ede
commit
72877e31ed
7 changed files with 193 additions and 1 deletions
17
api/tests/test_urls.py
Normal file
17
api/tests/test_urls.py
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
from django.urls import reverse
|
||||
from django import urls
|
||||
|
||||
|
||||
def test_can_resolve_v1():
|
||||
path = reverse("api:v1:instance:nodeinfo-2.0")
|
||||
assert path == "/api/v1/instance/nodeinfo/2.0"
|
||||
|
||||
|
||||
def test_can_resolve_subsonic():
|
||||
path = reverse("api:subsonic:subsonic-ping")
|
||||
assert path == "/api/subsonic/rest/ping"
|
||||
|
||||
|
||||
def test_can_resolve_v2():
|
||||
path = reverse("api:v2:instance:nodeinfo-2.0")
|
||||
assert path == "/api/v2/instance/nodeinfo/2.0"
|
||||
Loading…
Add table
Add a link
Reference in a new issue