66
77@pytest .mark .django_db
88def test_role_definition_list_remote_and_local (admin_api_client , inv_rd , foo_rd ):
9+ "Test that the role_definitions endpoint does not choke when remote permissions are listed."
910 url = get_relative_url ('roledefinition-list' )
1011 response = admin_api_client .get (url )
1112 assert response .status_code == 200
@@ -19,10 +20,8 @@ def test_role_definition_list_remote_and_local(admin_api_client, inv_rd, foo_rd)
1920
2021
2122@pytest .mark .django_db
22- def test_create_remote_role_definition (admin_api_client , foo_type , foo_permission ):
23- """
24- Test creation of a custom, remote role definition.
25- """
23+ def test_create_remote_role_definition_for_remote (admin_api_client , foo_type , foo_permission ):
24+ "Test creation of a custom role definition that gives permission to remote things."
2625 url = get_relative_url ("roledefinition-list" )
2726 data = dict (name = 'foo-foo-foo-custom' , description = 'bar' , permissions = [foo_permission .api_slug ], content_type = foo_type .api_slug )
2827 response = admin_api_client .post (url , data = data , format = "json" )
@@ -32,7 +31,8 @@ def test_create_remote_role_definition(admin_api_client, foo_type, foo_permissio
3231
3332
3433@pytest .mark .django_db
35- def test_give_remote_permission (admin_api_client , rando , foo_type , foo_rd ):
34+ def test_user_role_assignment_remote_and_local (admin_api_client , rando , foo_type , foo_rd ):
35+ "Test that after assigning permission to remote objects the assignment list works."
3636 a_foo = RemoteObject (content_type = foo_type , object_id = 42 )
3737 assignment = foo_rd .give_permission (rando , a_foo )
3838 assignment .content_object
0 commit comments