Skip to content

Commit cc24e0e

Browse files
committed
fix lint issue
2 parents ed55e48 + ccc2362 commit cc24e0e

File tree

1 file changed

+0
-26
lines changed

1 file changed

+0
-26
lines changed

libs/labelbox/tests/integration/test_api_keys.py

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44

55
from labelbox.schema.timeunit import TimeUnit
66
from labelbox.schema.api_key import ApiKey
7-
from lbox.exceptions import LabelboxError
8-
# The creation of API keys requires a feature flag to be enabled.
97

108

119
@pytest.mark.skipif(
@@ -227,27 +225,3 @@ def test_create_api_key_invalid_time_unit(client):
227225
time_unit="days", # String instead of TimeUnit enum
228226
)
229227
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 sdmin 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-
assert client.get_user().org_role().name == "Admin"
241-
242-
# Attempt to create another API key using the limited permissions client
243-
# This should fail due to insufficient permissions
244-
with pytest.raises(LabelboxError) as excinfo:
245-
client.create_api_key(
246-
name=f"Test Key {uuid.uuid4()}",
247-
user=user_email,
248-
role="Admin",
249-
validity=5,
250-
time_unit=TimeUnit.MINUTE,
251-
)
252-
253-
assert "192" in str(excinfo.value)

0 commit comments

Comments
 (0)