{"action":"created","comment":{"url":"https://api.github.com/repos/Formeme/HappyKh/pulls/comments/234942965","pull_request_review_id":176691513,"id":234942965,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNDk0Mjk2NQ==","diff_hunk":"@@ -283,6 +285,84 @@ def test_requesting_editing_permission(self):\n         self.assertEqual(status.HTTP_201_CREATED, response.status_code)\n \n \n+class TestMultiplePlaces(BaseTestCase, APITestCase):\n+    \"\"\"Test places with number of instances\"\"\"\n+\n+    def setUp(self):\n+        \"\"\"Create user and couple place's instances\"\"\"\n+        super().setUp()\n+        self.user = User.objects.create_user(**CORRECT_USER_DATA)\n+        self.hashed_user_id = self.HASH_IDS.encode(self.user.pk)\n+        self.address = Address.objects.create(**TEST_ADDRESS_DATA)\n+        self.default_limit = 15\n+\n+        Place.objects.create(address=self.address,\n+                             name='A first name',\n+                             description='description',\n+                             logo='')\n+\n+        Place.objects.create(address=self.address,\n+                             name='B second name',\n+                             description='description',\n+                             logo='')\n+\n+        self.places = Place.objects.all()\n+        user_token = Token.objects.create(user=self.user)\n+        self.client.credentials(HTTP_AUTHORIZATION='Token ' + user_token.key)\n+\n+    def test_get_multiple_places_specifying_invalid_str_params(self):\n+        \"\"\"\n+        Test get request for multiple specifying\n+        limit and page params with str values\n+        \"\"\"\n+        response = self.client.get(SPECIFYING_PAGINATION_PLACE_URL\n+                                   .format('bad', 'params'))\n+        serializer = PlaceSerializer(self.places, many=True)\n+\n+        paginator = Paginator(serializer.data, self.default_limit)\n+        expected = paginator.get_page(1)\n+\n+        self.assertEqual(status.HTTP_200_OK, response.status_code)\n+        self.assertEqual(expected.object_list, response.data['places'])\n+        self.assertEqual(paginator.count, response.data['total_number'])\n+        self.assertEqual(expected.number, response.data['current_page'])\n+        self.assertEqual(self.default_limit, response.data['objects_limit'])\n+\n+    def test_get_multiple_places_specifying_invalid_value_params(self):\n+        \"\"\"\n+        Test get request for multiple specifying\n+        limit and page params with nonpositive values\n+        \"\"\"\n+        response = self.client.get(SPECIFYING_PAGINATION_PLACE_URL\n+                                   .format(-1, -1))\n+        serializer = PlaceSerializer(self.places, many=True)\n+\n+        specific_limit = 1  # limit sets 1 if param value is nonpositive\n+        paginator = Paginator(serializer.data, specific_limit)\n+        expected = paginator.get_page(paginator.num_pages)\n+\n+        self.assertEqual(status.HTTP_200_OK, response.status_code)\n+        self.assertEqual(expected.object_list, response.data['places'])\n+        self.assertEqual(paginator.count, response.data['total_number'])\n+        self.assertEqual(expected.number, response.data['current_page'])\n+        self.assertEqual(specific_limit, response.data['objects_limit'])\n+\n+    def test_get_multiple_places_specifying_filter_param(self):\n+        \"\"\"\n+        Test get request for multiple places\n+        specifying search param for filtering\n+        \"\"\"\n+        filter_param = 'first'\n+        response = self.client.get(SPECIFYING_FILTER_PLACE_URL","path":"backend/tests/places/test_place.py","position":90,"original_position":90,"commit_id":"c92155cfa3357e3db09719514a8e7cb22910b37e","original_commit_id":"c92155cfa3357e3db09719514a8e7cb22910b37e","user":{"login":"HolmesInc","id":12729384,"node_id":"MDQ6VXNlcjEyNzI5Mzg0","avatar_url":"https://avatars2.githubusercontent.com/u/12729384?v=4","gravatar_id":"","url":"https://api.github.com/users/HolmesInc","html_url":"https://github.com/HolmesInc","followers_url":"https://api.github.com/users/HolmesInc/followers","following_url":"https://api.github.com/users/HolmesInc/following{/other_user}","gists_url":"https://api.github.com/users/HolmesInc/gists{/gist_id}","starred_url":"https://api.github.com/users/HolmesInc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HolmesInc/subscriptions","organizations_url":"https://api.github.com/users/HolmesInc/orgs","repos_url":"https://api.github.com/users/HolmesInc/repos","events_url":"https://api.github.com/users/HolmesInc/events{/privacy}","received_events_url":"https://api.github.com/users/HolmesInc/received_events","type":"User","site_admin":false},"body":"и тут","created_at":"2018-11-20T10:18:51Z","updated_at":"2018-11-20T10:19:50Z","html_url":"https://github.com/Formeme/HappyKh/pull/121#discussion_r234942965","pull_request_url":"https://api.github.com/repos/Formeme/HappyKh/pulls/121","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/Formeme/HappyKh/pulls/comments/234942965"},"html":{"href":"https://github.com/Formeme/HappyKh/pull/121#discussion_r234942965"},"pull_request":{"href":"https://api.github.com/repos/Formeme/HappyKh/pulls/121"}}},"pull_request":{"url":"https://api.github.com/repos/Formeme/HappyKh/pulls/121","id":232239298,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMyMjM5Mjk4","html_url":"https://github.com/Formeme/HappyKh/pull/121","diff_url":"https://github.com/Formeme/HappyKh/pull/121.diff","patch_url":"https://github.com/Formeme/HappyKh/pull/121.patch","issue_url":"https://api.github.com/repos/Formeme/HappyKh/issues/121","number":121,"state":"open","locked":false,"title":"Feature khwp 83 change list of places","user":{"login":"4stray","id":39695588,"node_id":"MDQ6VXNlcjM5Njk1NTg4","avatar_url":"https://avatars2.githubusercontent.com/u/39695588?v=4","gravatar_id":"","url":"https://api.github.com/users/4stray","html_url":"https://github.com/4stray","followers_url":"https://api.github.com/users/4stray/followers","following_url":"https://api.github.com/users/4stray/following{/other_user}","gists_url":"https://api.github.com/users/4stray/gists{/gist_id}","starred_url":"https://api.github.com/users/4stray/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/4stray/subscriptions","organizations_url":"https://api.github.com/users/4stray/orgs","repos_url":"https://api.github.com/users/4stray/repos","events_url":"https://api.github.com/users/4stray/events{/privacy}","received_events_url":"https://api.github.com/users/4stray/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-11-20T09:07:30Z","updated_at":"2018-11-20T10:19:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5a07eeda552d8ba19a8687670c22d5dba8867f5c","assignee":null,"assignees":[],"requested_reviewers":[{"login":"nikita-sobol","id":28556182,"node_id":"MDQ6VXNlcjI4NTU2MTgy","avatar_url":"https://avatars3.githubusercontent.com/u/28556182?v=4","gravatar_id":"","url":"https://api.github.com/users/nikita-sobol","html_url":"https://github.com/nikita-sobol","followers_url":"https://api.github.com/users/nikita-sobol/followers","following_url":"https://api.github.com/users/nikita-sobol/following{/other_user}","gists_url":"https://api.github.com/users/nikita-sobol/gists{/gist_id}","starred_url":"https://api.github.com/users/nikita-sobol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikita-sobol/subscriptions","organizations_url":"https://api.github.com/users/nikita-sobol/orgs","repos_url":"https://api.github.com/users/nikita-sobol/repos","events_url":"https://api.github.com/users/nikita-sobol/events{/privacy}","received_events_url":"https://api.github.com/users/nikita-sobol/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Formeme/HappyKh/pulls/121/commits","review_comments_url":"https://api.github.com/repos/Formeme/HappyKh/pulls/121/comments","review_comment_url":"https://api.github.com/repos/Formeme/HappyKh/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Formeme/HappyKh/issues/121/comments","statuses_url":"https://api.github.com/repos/Formeme/HappyKh/statuses/c92155cfa3357e3db09719514a8e7cb22910b37e","head":{"label":"Formeme:feature_KHWP-83_change_list_of_places","ref":"feature_KHWP-83_change_list_of_places","sha":"c92155cfa3357e3db09719514a8e7cb22910b37e","user":{"login":"Formeme","id":18327030,"node_id":"MDQ6VXNlcjE4MzI3MDMw","avatar_url":"https://avatars0.githubusercontent.com/u/18327030?v=4","gravatar_id":"","url":"https://api.github.com/users/Formeme","html_url":"https://github.com/Formeme","followers_url":"https://api.github.com/users/Formeme/followers","following_url":"https://api.github.com/users/Formeme/following{/other_user}","gists_url":"https://api.github.com/users/Formeme/gists{/gist_id}","starred_url":"https://api.github.com/users/Formeme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Formeme/subscriptions","organizations_url":"https://api.github.com/users/Formeme/orgs","repos_url":"https://api.github.com/users/Formeme/repos","events_url":"https://api.github.com/users/Formeme/events{/privacy}","received_events_url":"https://api.github.com/users/Formeme/received_events","type":"User","site_admin":false},"repo":{"id":146305676,"node_id":"MDEwOlJlcG9zaXRvcnkxNDYzMDU2NzY=","name":"HappyKh","full_name":"Formeme/HappyKh","private":false,"owner":{"login":"Formeme","id":18327030,"node_id":"MDQ6VXNlcjE4MzI3MDMw","avatar_url":"https://avatars0.githubusercontent.com/u/18327030?v=4","gravatar_id":"","url":"https://api.github.com/users/Formeme","html_url":"https://github.com/Formeme","followers_url":"https://api.github.com/users/Formeme/followers","following_url":"https://api.github.com/users/Formeme/following{/other_user}","gists_url":"https://api.github.com/users/Formeme/gists{/gist_id}","starred_url":"https://api.github.com/users/Formeme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Formeme/subscriptions","organizations_url":"https://api.github.com/users/Formeme/orgs","repos_url":"https://api.github.com/users/Formeme/repos","events_url":"https://api.github.com/users/Formeme/events{/privacy}","received_events_url":"https://api.github.com/users/Formeme/received_events","type":"User","site_admin":false},"html_url":"https://github.com/Formeme/HappyKh","description":"City portal HappyKh","fork":false,"url":"https://api.github.com/repos/Formeme/HappyKh","forks_url":"https://api.github.com/repos/Formeme/HappyKh/forks","keys_url":"https://api.github.com/repos/Formeme/HappyKh/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Formeme/HappyKh/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Formeme/HappyKh/teams","hooks_url":"https://api.github.com/repos/Formeme/HappyKh/hooks","issue_events_url":"https://api.github.com/repos/Formeme/HappyKh/issues/events{/number}","events_url":"https://api.github.com/repos/Formeme/HappyKh/events","assignees_url":"https://api.github.com/repos/Formeme/HappyKh/assignees{/user}","branches_url":"https://api.github.com/repos/Formeme/HappyKh/branches{/branch}","tags_url":"https://api.github.com/repos/Formeme/HappyKh/tags","blobs_url":"https://api.github.com/repos/Formeme/HappyKh/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Formeme/HappyKh/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Formeme/HappyKh/git/refs{/sha}","trees_url":"https://api.github.com/repos/Formeme/HappyKh/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Formeme/HappyKh/statuses/{sha}","languages_url":"https://api.github.com/repos/Formeme/HappyKh/languages","stargazers_url":"https://api.github.com/repos/Formeme/HappyKh/stargazers","contributors_url":"https://api.github.com/repos/Formeme/HappyKh/contributors","subscribers_url":"https://api.github.com/repos/Formeme/HappyKh/subscribers","subscription_url":"https://api.github.com/repos/Formeme/HappyKh/subscription","commits_url":"https://api.github.com/repos/Formeme/HappyKh/commits{/sha}","git_commits_url":"https://api.github.com/repos/Formeme/HappyKh/git/commits{/sha}","comments_url":"https://api.github.com/repos/Formeme/HappyKh/comments{/number}","issue_comment_url":"https://api.github.com/repos/Formeme/HappyKh/issues/comments{/number}","contents_url":"https://api.github.com/repos/Formeme/HappyKh/contents/{+path}","compare_url":"https://api.github.com/repos/Formeme/HappyKh/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Formeme/HappyKh/merges","archive_url":"https://api.github.com/repos/Formeme/HappyKh/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Formeme/HappyKh/downloads","issues_url":"https://api.github.com/repos/Formeme/HappyKh/issues{/number}","pulls_url":"https://api.github.com/repos/Formeme/HappyKh/pulls{/number}","milestones_url":"https://api.github.com/repos/Formeme/HappyKh/milestones{/number}","notifications_url":"https://api.github.com/repos/Formeme/HappyKh/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Formeme/HappyKh/labels{/name}","releases_url":"https://api.github.com/repos/Formeme/HappyKh/releases{/id}","deployments_url":"https://api.github.com/repos/Formeme/HappyKh/deployments","created_at":"2018-08-27T14:02:39Z","updated_at":"2018-11-14T07:39:35Z","pushed_at":"2018-11-20T10:00:08Z","git_url":"git://github.com/Formeme/HappyKh.git","ssh_url":"git@github.com:Formeme/HappyKh.git","clone_url":"https://github.com/Formeme/HappyKh.git","svn_url":"https://github.com/Formeme/HappyKh","homepage":"https://happykh.netlify.com/#/","size":54705,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":null,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"Formeme:develop","ref":"develop","sha":"68d19d36f1c6005023b2cd29aa9461922cda7054","user":{"login":"Formeme","id":18327030,"node_id":"MDQ6VXNlcjE4MzI3MDMw","avatar_url":"https://avatars0.githubusercontent.com/u/18327030?v=4","gravatar_id":"","url":"https://api.github.com/users/Formeme","html_url":"https://github.com/Formeme","followers_url":"https://api.github.com/users/Formeme/followers","following_url":"https://api.github.com/users/Formeme/following{/other_user}","gists_url":"https://api.github.com/users/Formeme/gists{/gist_id}","starred_url":"https://api.github.com/users/Formeme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Formeme/subscriptions","organizations_url":"https://api.github.com/users/Formeme/orgs","repos_url":"https://api.github.com/users/Formeme/repos","events_url":"https://api.github.com/users/Formeme/events{/privacy}","received_events_url":"https://api.github.com/users/Formeme/received_events","type":"User","site_admin":false},"repo":{"id":146305676,"node_id":"MDEwOlJlcG9zaXRvcnkxNDYzMDU2NzY=","name":"HappyKh","full_name":"Formeme/HappyKh","private":false,"owner":{"login":"Formeme","id":18327030,"node_id":"MDQ6VXNlcjE4MzI3MDMw","avatar_url":"https://avatars0.githubusercontent.com/u/18327030?v=4","gravatar_id":"","url":"https://api.github.com/users/Formeme","html_url":"https://github.com/Formeme","followers_url":"https://api.github.com/users/Formeme/followers","following_url":"https://api.github.com/users/Formeme/following{/other_user}","gists_url":"https://api.github.com/users/Formeme/gists{/gist_id}","starred_url":"https://api.github.com/users/Formeme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Formeme/subscriptions","organizations_url":"https://api.github.com/users/Formeme/orgs","repos_url":"https://api.github.com/users/Formeme/repos","events_url":"https://api.github.com/users/Formeme/events{/privacy}","received_events_url":"https://api.github.com/users/Formeme/received_events","type":"User","site_admin":false},"html_url":"https://github.com/Formeme/HappyKh","description":"City portal HappyKh","fork":false,"url":"https://api.github.com/repos/Formeme/HappyKh","forks_url":"https://api.github.com/repos/Formeme/HappyKh/forks","keys_url":"https://api.github.com/repos/Formeme/HappyKh/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Formeme/HappyKh/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Formeme/HappyKh/teams","hooks_url":"https://api.github.com/repos/Formeme/HappyKh/hooks","issue_events_url":"https://api.github.com/repos/Formeme/HappyKh/issues/events{/number}","events_url":"https://api.github.com/repos/Formeme/HappyKh/events","assignees_url":"https://api.github.com/repos/Formeme/HappyKh/assignees{/user}","branches_url":"https://api.github.com/repos/Formeme/HappyKh/branches{/branch}","tags_url":"https://api.github.com/repos/Formeme/HappyKh/tags","blobs_url":"https://api.github.com/repos/Formeme/HappyKh/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Formeme/HappyKh/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Formeme/HappyKh/git/refs{/sha}","trees_url":"https://api.github.com/repos/Formeme/HappyKh/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Formeme/HappyKh/statuses/{sha}","languages_url":"https://api.github.com/repos/Formeme/HappyKh/languages","stargazers_url":"https://api.github.com/repos/Formeme/HappyKh/stargazers","contributors_url":"https://api.github.com/repos/Formeme/HappyKh/contributors","subscribers_url":"https://api.github.com/repos/Formeme/HappyKh/subscribers","subscription_url":"https://api.github.com/repos/Formeme/HappyKh/subscription","commits_url":"https://api.github.com/repos/Formeme/HappyKh/commits{/sha}","git_commits_url":"https://api.github.com/repos/Formeme/HappyKh/git/commits{/sha}","comments_url":"https://api.github.com/repos/Formeme/HappyKh/comments{/number}","issue_comment_url":"https://api.github.com/repos/Formeme/HappyKh/issues/comments{/number}","contents_url":"https://api.github.com/repos/Formeme/HappyKh/contents/{+path}","compare_url":"https://api.github.com/repos/Formeme/HappyKh/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Formeme/HappyKh/merges","archive_url":"https://api.github.com/repos/Formeme/HappyKh/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Formeme/HappyKh/downloads","issues_url":"https://api.github.com/repos/Formeme/HappyKh/issues{/number}","pulls_url":"https://api.github.com/repos/Formeme/HappyKh/pulls{/number}","milestones_url":"https://api.github.com/repos/Formeme/HappyKh/milestones{/number}","notifications_url":"https://api.github.com/repos/Formeme/HappyKh/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Formeme/HappyKh/labels{/name}","releases_url":"https://api.github.com/repos/Formeme/HappyKh/releases{/id}","deployments_url":"https://api.github.com/repos/Formeme/HappyKh/deployments","created_at":"2018-08-27T14:02:39Z","updated_at":"2018-11-14T07:39:35Z","pushed_at":"2018-11-20T10:00:08Z","git_url":"git://github.com/Formeme/HappyKh.git","ssh_url":"git@github.com:Formeme/HappyKh.git","clone_url":"https://github.com/Formeme/HappyKh.git","svn_url":"https://github.com/Formeme/HappyKh","homepage":"https://happykh.netlify.com/#/","size":54705,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":null,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Formeme/HappyKh/pulls/121"},"html":{"href":"https://github.com/Formeme/HappyKh/pull/121"},"issue":{"href":"https://api.github.com/repos/Formeme/HappyKh/issues/121"},"comments":{"href":"https://api.github.com/repos/Formeme/HappyKh/issues/121/comments"},"review_comments":{"href":"https://api.github.com/repos/Formeme/HappyKh/pulls/121/comments"},"review_comment":{"href":"https://api.github.com/repos/Formeme/HappyKh/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Formeme/HappyKh/pulls/121/commits"},"statuses":{"href":"https://api.github.com/repos/Formeme/HappyKh/statuses/c92155cfa3357e3db09719514a8e7cb22910b37e"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"HolmesInc"}}