test(user): user provile updates

This commit is contained in:
izzy lyseggen
2021-01-21 12:10:44 +00:00
parent 11fee54d36
commit 94f47eeb17
+13
View File
@@ -1,3 +1,4 @@
from speckle.logging.exceptions import SpeckleException
from speckle.api.models import User
import pytest
@@ -30,3 +31,15 @@ class TestUser:
assert fetched_user.email == second_user_dict["email"]
second_user_dict["id"] = fetched_user.id
def test_user_update(self, client):
bio = "i am a ghost in the machine"
failed_update = client.user.update()
updated = client.user.update(bio=bio)
me = client.user.get()
assert isinstance(failed_update, SpeckleException)
assert updated is True
assert me.bio == bio