70b63b68ee62d5c4815d321d4e1b2a8f1c5fed54,app/api/tests/test_api.py,TestDocumentListAPI,test_returns_docs_to_project_member_filtered_to_completed,#TestDocumentListAPI#,434

Before Change


        self.assertEqual(len(response.json().get("results")), 1)

    def test_returns_docs_to_project_member_filtered_to_completed(self):
        self.client.login(username=self.project_member_name,
                          password=self.project_member_pass)
        response = self.client.get("{}?doc_annotations__isnull=false".format(self.url), format="json")
        self.assertEqual(response.status_code, status.HTTP_200_OK)
        self.assertEqual(len(response.json().get("results")), 2)

    def test_returns_docs_in_consistent_order_for_all_users(self):

After Change


                        expected_num_results=1)

    def test_returns_docs_to_project_member_filtered_to_completed(self):
        self._test_list("{}?doc_annotations__isnull=false".format(self.url),
                        username=self.project_member_name,
                        password=self.project_member_pass,
                        expected_num_results=2)

    def test_returns_docs_in_consistent_order_for_all_users(self):
        self.client.login(username=self.project_member_name, password=self.project_member_pass)
        user1_documents = self.client.get(self.url, format="json").json().get("results")
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: chakki-works/doccano
Commit Name: 70b63b68ee62d5c4815d321d4e1b2a8f1c5fed54
Time: 2020-01-06
Author: clewolff@microsoft.com
File Name: app/api/tests/test_api.py
Class Name: TestDocumentListAPI
Method Name: test_returns_docs_to_project_member_filtered_to_completed


Project Name: chakki-works/doccano
Commit Name: 70b63b68ee62d5c4815d321d4e1b2a8f1c5fed54
Time: 2020-01-06
Author: clewolff@microsoft.com
File Name: app/api/tests/test_api.py
Class Name: TestDocumentListAPI
Method Name: test_returns_docs_to_project_member_filtered_to_active


Project Name: chakki-works/doccano
Commit Name: 70b63b68ee62d5c4815d321d4e1b2a8f1c5fed54
Time: 2020-01-06
Author: clewolff@microsoft.com
File Name: app/api/tests/test_api.py
Class Name: TestDocumentListAPI
Method Name: test_do_not_return_docs_of_other_projects