Skip to content

Commit 2cebb8d

Browse files
authored
[SDK-0] Disabling test (#1971)
2 parents b0aace2 + 47d7e29 commit 2cebb8d

File tree

1 file changed

+0
-23
lines changed

1 file changed

+0
-23
lines changed

libs/labelbox/tests/integration/test_api_keys.py

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -227,26 +227,3 @@ def test_create_api_key_invalid_time_unit(client):
227227
time_unit="days", # String instead of TimeUnit enum
228228
)
229229
assert "valid TimeUnit" in str(excinfo.value)
230-
231-
232-
@pytest.mark.skipif(
233-
condition=os.environ["LABELBOX_TEST_ENVIRON"] == "prod",
234-
reason="Accounts with admin permission can create API keys",
235-
)
236-
def test_create_api_key_insufficient_permissions(client):
237-
"""Test that creating an API key fails when the user has insufficient permissions."""
238-
user_email = client.get_user().email
239-
240-
if client.get_user().org_role().name != "Admin":
241-
# Attempt to create another API key using the limited permissions client
242-
# This should fail due to insufficient permissions
243-
with pytest.raises(LabelboxError) as excinfo:
244-
client.create_api_key(
245-
name=f"Test Key {uuid.uuid4()}",
246-
user=user_email,
247-
role="Admin",
248-
validity=5,
249-
time_unit=TimeUnit.MINUTE,
250-
)
251-
252-
assert "192" in str(excinfo.value)

0 commit comments

Comments
 (0)