File tree Expand file tree Collapse file tree 1 file changed +0
-21
lines changed
libs/labelbox/tests/integration Expand file tree Collapse file tree 1 file changed +0
-21
lines changed Original file line number Diff line number Diff 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 )
You can’t perform that action at this time.
0 commit comments