Commit 843b7dbc authored by Jan Luttermann's avatar Jan Luttermann
Browse files

fix: changed post to put for changing alias

Closes: !16
parent 2cdcb321
Pipeline #5004 passed with stage
in 2 minutes and 8 seconds
......@@ -12,6 +12,7 @@ from urllib.parse import urljoin
from requests import delete as _delete
from requests import get as _get
from requests import post as _post
from requests import put as _put
from briar_wrapper.constants import BASE_HTTP_URL
from briar_wrapper.model import Model
......@@ -46,7 +47,7 @@ class Contacts(Model):
url = urljoin(BASE_HTTP_URL, self._API_ENDPOINT + f"{str(contact_id)}/alias")
_post(url, headers=self._headers, json={"alias": alias})
_put(url, headers=self._headers, json={"alias": alias})
def delete(self, contact_id: int) -> None:
# pylint: disable=line-too-long
......@@ -54,7 +54,7 @@ def match_request_add_pending(request):
def test_set_alias(api, request_headers, requests_mock):
contacts = Contacts(api)
contact_id = 137
BASE_HTTP_URL + f"{contact_id}/alias",
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment