ef8f02dc2b1eca8b7633d76823a8500ef3e3042c,app/server/tests/test_api.py,TestEntityDetailAPI,setUpTestData,#Any#,430

Before Change


                                                          main_project_doc.id,
                                                          main_project_entity.id])
        cls.post_data = {"start_offset": 0, "end_offset": 10}
        cls.count = SequenceAnnotation.objects.filter(document=main_project_doc).count()

    def test_returns_entity_to_project_member(self):
        self.client.login(username=self.project_member_name,
                          password=self.project_member_pass)

After Change


        non_project_member = User.objects.create_user(username=cls.non_project_member_name,
                                                      password=cls.non_project_member_pass)

        main_project = mixer.blend("server.Project", users=[project_member, another_project_member])
        main_project_doc = mixer.blend("server.Document", project=main_project)
        main_project_entity = mixer.blend("server.SequenceAnnotation",
                                          document=main_project_doc, user=project_member)
        another_entity = mixer.blend("server.SequenceAnnotation",
                                     document=main_project_doc, user=another_project_member)

        sub_project = mixer.blend("server.Project", users=[non_project_member])
        sub_project_doc = mixer.blend("server.Document", project=sub_project)
        mixer.blend("server.SequenceAnnotation", document=sub_project_doc)

        cls.url = reverse(viewname="entity_detail", args=[main_project.id,
                                                          main_project_doc.id,
                                                          main_project_entity.id])
        cls.another_url = reverse(viewname="entity_detail", args=[main_project.id,
                                                                  main_project_doc.id,
                                                                  another_entity.id])
        cls.post_data = {"start_offset": 0, "end_offset": 10}

    def test_returns_entity_to_project_member(self):
        self.client.login(username=self.project_member_name,
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 4

Instances


Project Name: chakki-works/doccano
Commit Name: ef8f02dc2b1eca8b7633d76823a8500ef3e3042c
Time: 2019-02-21
Author: light.tree.1.13@gmail.com
File Name: app/server/tests/test_api.py
Class Name: TestEntityDetailAPI
Method Name: setUpTestData


Project Name: MTG/freesound
Commit Name: 79dadfb89e9fb05d0361fcbe3e3b4604905a2955
Time: 2019-09-04
Author: frederic.font@upf.edu
File Name: sounds/templatetags/display_pack.py
Class Name:
Method Name: display_pack


Project Name: markovmodel/PyEMMA
Commit Name: c36e813829e9cf06a97242d644b483fae80dd2b7
Time: 2017-12-21
Author: m.scherer@fu-berlin.de
File Name: pyemma/_base/serialization/pickle_extensions.py
Class Name: HDF5PersistentPickler
Method Name: __init__


Project Name: Pinafore/qb
Commit Name: 2f74f04253d5a90459401d0f09ea0559d50371a0
Time: 2016-06-25
Author: ski.rodriguez@gmail.com
File Name: util/guess.py
Class Name: GuessList
Method Name: check_recall