mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-04 13:49:17 +02:00
Fix #851: wrong og:image url when using S3 storage
This commit is contained in:
parent
9ae2c490ca
commit
ce4a6b0412
3 changed files with 18 additions and 0 deletions
|
@ -85,3 +85,17 @@ def test_get_updated_fields(conf, mock_args, data, expected, mocker):
|
|||
obj = mocker.Mock(**mock_args)
|
||||
|
||||
assert utils.get_updated_fields(conf, data, obj) == expected
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"start, end, expected",
|
||||
[
|
||||
("https://domain", "/api", "https://domain/api"),
|
||||
("https://domain/", "/api", "https://domain/api"),
|
||||
("https://domain", "api", "https://domain/api"),
|
||||
("https://domain", "https://api", "https://api"),
|
||||
("https://domain", "http://api", "http://api"),
|
||||
],
|
||||
)
|
||||
def test_join_url(start, end, expected):
|
||||
assert utils.join_url(start, end) == expected
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue