Skip to content

Commit 4985401

Browse files
committed
removed test
Signed-off-by: Mihhail Matisinets <mihhail.matisinets@gmail.com>
1 parent ab67e6e commit 4985401

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

libs/labelbox/tests/integration/test_api_keys.py

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -228,24 +228,3 @@ def test_create_api_key_invalid_time_unit(client):
228228
)
229229
assert "valid TimeUnit" in str(excinfo.value)
230230

231-
# Not removing test completely as perhaps the original author on the test could elaborate more
232-
# Disabling for the CI
233-
@pytest.mark.skip(reason="Test does not make sense as there is no client with restricted permissions")
234-
def test_create_api_key_insufficient_permissions(client):
235-
"""Test that creating an API key fails when the user has insufficient permissions."""
236-
user_email = client.get_user().email
237-
238-
assert client.get_user().org_role().name == "Admin"
239-
240-
# Attempt to create another API key using the limited permissions client
241-
# This should fail due to insufficient permissions
242-
with pytest.raises(LabelboxError) as excinfo:
243-
client.create_api_key(
244-
name=f"Test Key {uuid.uuid4()}",
245-
user=user_email,
246-
role="Admin",
247-
validity=5,
248-
time_unit=TimeUnit.MINUTE,
249-
)
250-
251-
assert "192" in str(excinfo.value)

0 commit comments

Comments
 (0)