mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-04 13:49:17 +02:00
Added FUNKWHALE_HOSTNAME and FEDERATION_HOSTNAME settings
This commit is contained in:
parent
588da6ff33
commit
90c1d02919
3 changed files with 36 additions and 1 deletions
14
api/tests/federation/test_utils.py
Normal file
14
api/tests/federation/test_utils.py
Normal file
|
@ -0,0 +1,14 @@
|
|||
import pytest
|
||||
|
||||
from funkwhale_api.federation import utils
|
||||
|
||||
|
||||
@pytest.mark.parametrize('url,path,expected', [
|
||||
('http://test.com', '/hello', 'http://test.com/hello'),
|
||||
('http://test.com/', 'hello', 'http://test.com/hello'),
|
||||
('http://test.com/', '/hello', 'http://test.com/hello'),
|
||||
('http://test.com', 'hello', 'http://test.com/hello'),
|
||||
])
|
||||
def test_full_url(settings, url, path, expected):
|
||||
settings.FUNKWHALE_URL = url
|
||||
assert utils.full_url(path) == expected
|
Loading…
Add table
Add a link
Reference in a new issue