mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-06 08:29:55 +02:00
Fix #705: Can now use a local file with FUNKWHALE_SPA_HTML_ROOT to avoid sending an HTTP request
This commit is contained in:
parent
d702f8f69f
commit
d99757658c
3 changed files with 11 additions and 0 deletions
|
@ -126,6 +126,12 @@ def test_get_spa_html_from_http(local_cache, r_mock, mocker, settings):
|
|||
)
|
||||
|
||||
|
||||
def test_get_spa_html_from_disk(tmpfile):
|
||||
with open(tmpfile.name, "wb") as f:
|
||||
f.write(b"hello world")
|
||||
assert middleware.get_spa_html(tmpfile.name) == "hello world"
|
||||
|
||||
|
||||
def test_get_route_head_tags(mocker, settings):
|
||||
match = mocker.Mock(args=[], kwargs={"pk": 42}, func=mocker.Mock())
|
||||
resolve = mocker.patch("django.urls.resolve", return_value=match)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue