mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-05 20:51:55 +02:00
Fix #798: Allow users with dots in their usernames to request a subsonic password
This commit is contained in:
parent
71b7f416cc
commit
b23e87e102
3 changed files with 17 additions and 0 deletions
|
@ -225,6 +225,21 @@ def test_user_can_get_subsonic_token(logged_in_api_client):
|
|||
assert response.data == {"subsonic_api_token": "test"}
|
||||
|
||||
|
||||
def test_user_can_request_new_subsonic_token_uncommon_username(logged_in_api_client):
|
||||
user = logged_in_api_client.user
|
||||
user.username = "firstname.lastname"
|
||||
user.subsonic_api_token = "test"
|
||||
user.save()
|
||||
|
||||
url = reverse(
|
||||
"api:v1:users:users-subsonic-token", kwargs={"username": user.username}
|
||||
)
|
||||
|
||||
response = logged_in_api_client.post(url)
|
||||
|
||||
assert response.status_code == 200
|
||||
|
||||
|
||||
def test_user_can_delete_subsonic_token(logged_in_api_client):
|
||||
user = logged_in_api_client.user
|
||||
user.subsonic_api_token = "test"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue