8e21d5f23d3207dde380d71244e9693e8d16814b,app/api/tests/test_api.py,TestRoleMappingDetailAPI,setUpTestData,#Any#,1429

Before Change


            password=cls.non_project_member_pass)
        project = mommy.make("Project", users=[project_admin, project_member])
        role = mommy.make("Role", name=settings.ROLE_PROJECT_ADMIN)
        change_role = mommy.make("Role", name=settings.ROLE_ANNOTATOR)
        cls.rolemapping = mommy.make("RoleMapping", role=role, project=project, user=project_admin)
        cls.url = reverse(viewname="rolemapping_detail", args=[project.id, cls.rolemapping.id])
        cls.data = {"role": change_role.id }

After Change


            password=cls.non_project_member_pass)
        project = mommy.make("Project", users=[project_admin, project_member])
        admin_role = Role.objects.get(name=settings.ROLE_PROJECT_ADMIN)
        annotator_role = Role.objects.get(name=settings.ROLE_ANNOTATOR)
        cls.rolemapping = mommy.make("RoleMapping", role=admin_role, project=project, user=project_admin)
        cls.url = reverse(viewname="rolemapping_detail", args=[project.id, cls.rolemapping.id])
        cls.data = {"role": annotator_role.id }
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: chakki-works/doccano
Commit Name: 8e21d5f23d3207dde380d71244e9693e8d16814b
Time: 2019-09-03
Author: mkm248@cornell.edu
File Name: app/api/tests/test_api.py
Class Name: TestRoleMappingDetailAPI
Method Name: setUpTestData


Project Name: chakki-works/doccano
Commit Name: 8e21d5f23d3207dde380d71244e9693e8d16814b
Time: 2019-09-03
Author: mkm248@cornell.edu
File Name: app/api/tests/test_api.py
Class Name: TestRoleMappingListAPI
Method Name: setUpTestData


Project Name: ray-project/ray
Commit Name: c009c178f6b8adaff9bb8e9cca2d0797d3d14425
Time: 2020-11-24
Author: 66017297+danuo@users.noreply.github.com
File Name: rllib/rollout.py
Class Name:
Method Name: rollout