Skip to content

Commit

Permalink
tests: Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
frascuchon committed Jan 20, 2025
1 parent 9225aee commit 8eb50a5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions argilla/tests/integration/test_manage_users.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@ def test_create_user(self, client: Argilla):
assert client.users(username=user.username).id == user.id

def test_create_user_with_id(self, client: Argilla):
user = User(id=uuid.uuid4(), username=f"test_user_{uuid.uuid4()}", password="test_password")
user_id = uuid.uuid4()
user = User(id=user_id, username=f"test_user_{uuid.uuid4()}", password="test_password")
client.users.add(user)
assert user.id is not None
assert client.users(username=user.username).id == user.id
assert client.users(username=user.username).id == user_id

def test_create_user_without_password(self, client: Argilla):
user = User(username=f"test_user_{uuid.uuid4()}")
Expand Down
6 changes: 3 additions & 3 deletions argilla/tests/integration/test_manage_workspaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ def test_create_workspace(self, client: Argilla):
assert client.api.workspaces.exists(workspace.id)

def test_create_workspace_with_id(self, client: Argilla):
workspace = Workspace(id=uuid.uuid4(), name=f"test_workspace{uuid.uuid4()}")
workspace_id = uuid.uuid4()
workspace = Workspace(id=workspace_id, name=f"test_workspace{uuid.uuid4()}")
client.workspaces.add(workspace)

assert workspace in client.workspaces
assert client.workspaces(workspace.name).id == workspace.id
assert client.workspaces(workspace.name).id == workspace_id

def test_create_and_delete_workspace(self, client: Argilla):
workspace = client.workspaces(name="test_workspace")
Expand Down

0 comments on commit 8eb50a5

Please sign in to comment.