{"action":"created","comment":{"url":"https://api.github.com/repos/Volontaria/API-Volontaria/pulls/comments/151851662","pull_request_review_id":77629573,"id":151851662,"diff_hunk":"@@ -0,0 +1,181 @@\n+from rest_framework.test import APIClient\n+from django.urls import reverse\n+from rest_framework import status\n+from rest_framework.test import APITestCase\n+from volunteer.models import Cycle\n+from apiVolontaria.factories import UserFactory, AdminFactory\n+from django.utils import timezone\n+import json\n+\n+\n+class CyclesIdTests(APITestCase):\n+\n+    def setUp(self):\n+        self.client = APIClient()\n+\n+        self.user = UserFactory()\n+        self.user.set_password('Test123!')\n+        self.user.save()\n+\n+        self.admin = AdminFactory()\n+        self.admin.set_password('Test123!')\n+        self.admin.save()\n+\n+        self.cycle = Cycle.objects.create(\n+            name='Cycle 1',\n+            start_date=timezone.now(),\n+            end_date=timezone.now() + timezone.timedelta(\n+                minutes=100,\n+            ),\n+        )\n+\n+    def test_retrieve_cycle_id_not_exist(self):\n+        \"\"\"\n+        Ensure we can't retrieve a cycle who doesn't exist.\n+        \"\"\"\n+        self.client.force_authenticate(user=self.user)\n+\n+        response = self.client.get(\n+            reverse(\n+                'volunteer:cycles_id',\n+                kwargs={'pk': 999},","path":"source/apiVolontaria/volunteer/tests/tests_view_CyclesId.py","position":41,"original_position":41,"commit_id":"128248216eb7259eb77cf3b0c5a4f5bc546efedb","original_commit_id":"128248216eb7259eb77cf3b0c5a4f5bc546efedb","user":{"login":"DarkFranX","id":14813038,"avatar_url":"https://avatars2.githubusercontent.com/u/14813038?v=4","gravatar_id":"","url":"https://api.github.com/users/DarkFranX","html_url":"https://github.com/DarkFranX","followers_url":"https://api.github.com/users/DarkFranX/followers","following_url":"https://api.github.com/users/DarkFranX/following{/other_user}","gists_url":"https://api.github.com/users/DarkFranX/gists{/gist_id}","starred_url":"https://api.github.com/users/DarkFranX/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DarkFranX/subscriptions","organizations_url":"https://api.github.com/users/DarkFranX/orgs","repos_url":"https://api.github.com/users/DarkFranX/repos","events_url":"https://api.github.com/users/DarkFranX/events{/privacy}","received_events_url":"https://api.github.com/users/DarkFranX/received_events","type":"User","site_admin":false},"body":"Does that mean we can search DB objects using their DB ID? Or is the PK different from the DB ID?","created_at":"2017-11-19T00:47:31Z","updated_at":"2017-11-19T01:04:56Z","html_url":"https://github.com/Volontaria/API-Volontaria/pull/27#discussion_r151851662","pull_request_url":"https://api.github.com/repos/Volontaria/API-Volontaria/pulls/27","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/Volontaria/API-Volontaria/pulls/comments/151851662"},"html":{"href":"https://github.com/Volontaria/API-Volontaria/pull/27#discussion_r151851662"},"pull_request":{"href":"https://api.github.com/repos/Volontaria/API-Volontaria/pulls/27"}}},"pull_request":{"url":"https://api.github.com/repos/Volontaria/API-Volontaria/pulls/27","id":152672106,"html_url":"https://github.com/Volontaria/API-Volontaria/pull/27","diff_url":"https://github.com/Volontaria/API-Volontaria/pull/27.diff","patch_url":"https://github.com/Volontaria/API-Volontaria/pull/27.patch","issue_url":"https://api.github.com/repos/Volontaria/API-Volontaria/issues/27","number":27,"state":"open","locked":false,"title":"Feature manage cycle","user":{"login":"RignonNoel","id":12053720,"avatar_url":"https://avatars3.githubusercontent.com/u/12053720?v=4","gravatar_id":"","url":"https://api.github.com/users/RignonNoel","html_url":"https://github.com/RignonNoel","followers_url":"https://api.github.com/users/RignonNoel/followers","following_url":"https://api.github.com/users/RignonNoel/following{/other_user}","gists_url":"https://api.github.com/users/RignonNoel/gists{/gist_id}","starred_url":"https://api.github.com/users/RignonNoel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RignonNoel/subscriptions","organizations_url":"https://api.github.com/users/RignonNoel/orgs","repos_url":"https://api.github.com/users/RignonNoel/repos","events_url":"https://api.github.com/users/RignonNoel/events{/privacy}","received_events_url":"https://api.github.com/users/RignonNoel/received_events","type":"User","site_admin":false},"body":"| Q                                                      | R\r\n| ------------------------------------------ | -------------------------------------------\r\n| Type of contribution ?                      | Features\r\n| Tickets (_issues_) concerned               | fixed #11 \r\n\r\n---\r\n\r\n##### What have you changed ?\r\nAdd CRUD on `cycle` objects\r\n\r\n##### How did you change it ?\r\nAdd `models`, `views`, `serializers` and `tests` to add this new complete features.\r\nAdd `volunteer` app in `settings.py`\r\n\r\nVerification :\r\n -  [x] My branch name respect the standard defined in `CONTRIBUTING.md`\r\n -  [x] This Pull-Request fully meets the requirements defined in the issue\r\n -  [x] I added or modified the attached tests\r\n","created_at":"2017-11-15T02:47:07Z","updated_at":"2017-11-19T01:04:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c5348068d33f77a50ce2d2715b3254ead80ec2d7","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/Volontaria/API-Volontaria/pulls/27/commits","review_comments_url":"https://api.github.com/repos/Volontaria/API-Volontaria/pulls/27/comments","review_comment_url":"https://api.github.com/repos/Volontaria/API-Volontaria/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Volontaria/API-Volontaria/issues/27/comments","statuses_url":"https://api.github.com/repos/Volontaria/API-Volontaria/statuses/128248216eb7259eb77cf3b0c5a4f5bc546efedb","head":{"label":"RignonNoel:feature-manage_cycle","ref":"feature-manage_cycle","sha":"128248216eb7259eb77cf3b0c5a4f5bc546efedb","user":{"login":"RignonNoel","id":12053720,"avatar_url":"https://avatars3.githubusercontent.com/u/12053720?v=4","gravatar_id":"","url":"https://api.github.com/users/RignonNoel","html_url":"https://github.com/RignonNoel","followers_url":"https://api.github.com/users/RignonNoel/followers","following_url":"https://api.github.com/users/RignonNoel/following{/other_user}","gists_url":"https://api.github.com/users/RignonNoel/gists{/gist_id}","starred_url":"https://api.github.com/users/RignonNoel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RignonNoel/subscriptions","organizations_url":"https://api.github.com/users/RignonNoel/orgs","repos_url":"https://api.github.com/users/RignonNoel/repos","events_url":"https://api.github.com/users/RignonNoel/events{/privacy}","received_events_url":"https://api.github.com/users/RignonNoel/received_events","type":"User","site_admin":false},"repo":{"id":110171548,"name":"API-Volontaria","full_name":"RignonNoel/API-Volontaria","owner":{"login":"RignonNoel","id":12053720,"avatar_url":"https://avatars3.githubusercontent.com/u/12053720?v=4","gravatar_id":"","url":"https://api.github.com/users/RignonNoel","html_url":"https://github.com/RignonNoel","followers_url":"https://api.github.com/users/RignonNoel/followers","following_url":"https://api.github.com/users/RignonNoel/following{/other_user}","gists_url":"https://api.github.com/users/RignonNoel/gists{/gist_id}","starred_url":"https://api.github.com/users/RignonNoel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RignonNoel/subscriptions","organizations_url":"https://api.github.com/users/RignonNoel/orgs","repos_url":"https://api.github.com/users/RignonNoel/repos","events_url":"https://api.github.com/users/RignonNoel/events{/privacy}","received_events_url":"https://api.github.com/users/RignonNoel/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/RignonNoel/API-Volontaria","description":null,"fork":true,"url":"https://api.github.com/repos/RignonNoel/API-Volontaria","forks_url":"https://api.github.com/repos/RignonNoel/API-Volontaria/forks","keys_url":"https://api.github.com/repos/RignonNoel/API-Volontaria/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RignonNoel/API-Volontaria/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RignonNoel/API-Volontaria/teams","hooks_url":"https://api.github.com/repos/RignonNoel/API-Volontaria/hooks","issue_events_url":"https://api.github.com/repos/RignonNoel/API-Volontaria/issues/events{/number}","events_url":"https://api.github.com/repos/RignonNoel/API-Volontaria/events","assignees_url":"https://api.github.com/repos/RignonNoel/API-Volontaria/assignees{/user}","branches_url":"https://api.github.com/repos/RignonNoel/API-Volontaria/branches{/branch}","tags_url":"https://api.github.com/repos/RignonNoel/API-Volontaria/tags","blobs_url":"https://api.github.com/repos/RignonNoel/API-Volontaria/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RignonNoel/API-Volontaria/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RignonNoel/API-Volontaria/git/refs{/sha}","trees_url":"https://api.github.com/repos/RignonNoel/API-Volontaria/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RignonNoel/API-Volontaria/statuses/{sha}","languages_url":"https://api.github.com/repos/RignonNoel/API-Volontaria/languages","stargazers_url":"https://api.github.com/repos/RignonNoel/API-Volontaria/stargazers","contributors_url":"https://api.github.com/repos/RignonNoel/API-Volontaria/contributors","subscribers_url":"https://api.github.com/repos/RignonNoel/API-Volontaria/subscribers","subscription_url":"https://api.github.com/repos/RignonNoel/API-Volontaria/subscription","commits_url":"https://api.github.com/repos/RignonNoel/API-Volontaria/commits{/sha}","git_commits_url":"https://api.github.com/repos/RignonNoel/API-Volontaria/git/commits{/sha}","comments_url":"https://api.github.com/repos/RignonNoel/API-Volontaria/comments{/number}","issue_comment_url":"https://api.github.com/repos/RignonNoel/API-Volontaria/issues/comments{/number}","contents_url":"https://api.github.com/repos/RignonNoel/API-Volontaria/contents/{+path}","compare_url":"https://api.github.com/repos/RignonNoel/API-Volontaria/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RignonNoel/API-Volontaria/merges","archive_url":"https://api.github.com/repos/RignonNoel/API-Volontaria/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RignonNoel/API-Volontaria/downloads","issues_url":"https://api.github.com/repos/RignonNoel/API-Volontaria/issues{/number}","pulls_url":"https://api.github.com/repos/RignonNoel/API-Volontaria/pulls{/number}","milestones_url":"https://api.github.com/repos/RignonNoel/API-Volontaria/milestones{/number}","notifications_url":"https://api.github.com/repos/RignonNoel/API-Volontaria/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RignonNoel/API-Volontaria/labels{/name}","releases_url":"https://api.github.com/repos/RignonNoel/API-Volontaria/releases{/id}","deployments_url":"https://api.github.com/repos/RignonNoel/API-Volontaria/deployments","created_at":"2017-11-09T22:06:26Z","updated_at":"2017-11-09T22:06:28Z","pushed_at":"2017-11-16T15:14:00Z","git_url":"git://github.com/RignonNoel/API-Volontaria.git","ssh_url":"git@github.com:RignonNoel/API-Volontaria.git","clone_url":"https://github.com/RignonNoel/API-Volontaria.git","svn_url":"https://github.com/RignonNoel/API-Volontaria","homepage":null,"size":55,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Volontaria:develop","ref":"develop","sha":"3cda5b9c7fb89cf54a836ba61bfbd9ea5159d9e0","user":{"login":"Volontaria","id":33267630,"avatar_url":"https://avatars3.githubusercontent.com/u/33267630?v=4","gravatar_id":"","url":"https://api.github.com/users/Volontaria","html_url":"https://github.com/Volontaria","followers_url":"https://api.github.com/users/Volontaria/followers","following_url":"https://api.github.com/users/Volontaria/following{/other_user}","gists_url":"https://api.github.com/users/Volontaria/gists{/gist_id}","starred_url":"https://api.github.com/users/Volontaria/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Volontaria/subscriptions","organizations_url":"https://api.github.com/users/Volontaria/orgs","repos_url":"https://api.github.com/users/Volontaria/repos","events_url":"https://api.github.com/users/Volontaria/events{/privacy}","received_events_url":"https://api.github.com/users/Volontaria/received_events","type":"Organization","site_admin":false},"repo":{"id":109053102,"name":"API-Volontaria","full_name":"Volontaria/API-Volontaria","owner":{"login":"Volontaria","id":33267630,"avatar_url":"https://avatars3.githubusercontent.com/u/33267630?v=4","gravatar_id":"","url":"https://api.github.com/users/Volontaria","html_url":"https://github.com/Volontaria","followers_url":"https://api.github.com/users/Volontaria/followers","following_url":"https://api.github.com/users/Volontaria/following{/other_user}","gists_url":"https://api.github.com/users/Volontaria/gists{/gist_id}","starred_url":"https://api.github.com/users/Volontaria/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Volontaria/subscriptions","organizations_url":"https://api.github.com/users/Volontaria/orgs","repos_url":"https://api.github.com/users/Volontaria/repos","events_url":"https://api.github.com/users/Volontaria/events{/privacy}","received_events_url":"https://api.github.com/users/Volontaria/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Volontaria/API-Volontaria","description":null,"fork":false,"url":"https://api.github.com/repos/Volontaria/API-Volontaria","forks_url":"https://api.github.com/repos/Volontaria/API-Volontaria/forks","keys_url":"https://api.github.com/repos/Volontaria/API-Volontaria/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Volontaria/API-Volontaria/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Volontaria/API-Volontaria/teams","hooks_url":"https://api.github.com/repos/Volontaria/API-Volontaria/hooks","issue_events_url":"https://api.github.com/repos/Volontaria/API-Volontaria/issues/events{/number}","events_url":"https://api.github.com/repos/Volontaria/API-Volontaria/events","assignees_url":"https://api.github.com/repos/Volontaria/API-Volontaria/assignees{/user}","branches_url":"https://api.github.com/repos/Volontaria/API-Volontaria/branches{/branch}","tags_url":"https://api.github.com/repos/Volontaria/API-Volontaria/tags","blobs_url":"https://api.github.com/repos/Volontaria/API-Volontaria/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Volontaria/API-Volontaria/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Volontaria/API-Volontaria/git/refs{/sha}","trees_url":"https://api.github.com/repos/Volontaria/API-Volontaria/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Volontaria/API-Volontaria/statuses/{sha}","languages_url":"https://api.github.com/repos/Volontaria/API-Volontaria/languages","stargazers_url":"https://api.github.com/repos/Volontaria/API-Volontaria/stargazers","contributors_url":"https://api.github.com/repos/Volontaria/API-Volontaria/contributors","subscribers_url":"https://api.github.com/repos/Volontaria/API-Volontaria/subscribers","subscription_url":"https://api.github.com/repos/Volontaria/API-Volontaria/subscription","commits_url":"https://api.github.com/repos/Volontaria/API-Volontaria/commits{/sha}","git_commits_url":"https://api.github.com/repos/Volontaria/API-Volontaria/git/commits{/sha}","comments_url":"https://api.github.com/repos/Volontaria/API-Volontaria/comments{/number}","issue_comment_url":"https://api.github.com/repos/Volontaria/API-Volontaria/issues/comments{/number}","contents_url":"https://api.github.com/repos/Volontaria/API-Volontaria/contents/{+path}","compare_url":"https://api.github.com/repos/Volontaria/API-Volontaria/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Volontaria/API-Volontaria/merges","archive_url":"https://api.github.com/repos/Volontaria/API-Volontaria/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Volontaria/API-Volontaria/downloads","issues_url":"https://api.github.com/repos/Volontaria/API-Volontaria/issues{/number}","pulls_url":"https://api.github.com/repos/Volontaria/API-Volontaria/pulls{/number}","milestones_url":"https://api.github.com/repos/Volontaria/API-Volontaria/milestones{/number}","notifications_url":"https://api.github.com/repos/Volontaria/API-Volontaria/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Volontaria/API-Volontaria/labels{/name}","releases_url":"https://api.github.com/repos/Volontaria/API-Volontaria/releases{/id}","deployments_url":"https://api.github.com/repos/Volontaria/API-Volontaria/deployments","created_at":"2017-10-31T21:16:13Z","updated_at":"2017-11-17T18:43:43Z","pushed_at":"2017-11-17T15:10:09Z","git_url":"git://github.com/Volontaria/API-Volontaria.git","ssh_url":"git@github.com:Volontaria/API-Volontaria.git","clone_url":"https://github.com/Volontaria/API-Volontaria.git","svn_url":"https://github.com/Volontaria/API-Volontaria","homepage":"https://volontaria.github.io/","size":45,"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":4,"mirror_url":null,"archived":false,"open_issues_count":14,"forks":4,"open_issues":14,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Volontaria/API-Volontaria/pulls/27"},"html":{"href":"https://github.com/Volontaria/API-Volontaria/pull/27"},"issue":{"href":"https://api.github.com/repos/Volontaria/API-Volontaria/issues/27"},"comments":{"href":"https://api.github.com/repos/Volontaria/API-Volontaria/issues/27/comments"},"review_comments":{"href":"https://api.github.com/repos/Volontaria/API-Volontaria/pulls/27/comments"},"review_comment":{"href":"https://api.github.com/repos/Volontaria/API-Volontaria/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Volontaria/API-Volontaria/pulls/27/commits"},"statuses":{"href":"https://api.github.com/repos/Volontaria/API-Volontaria/statuses/128248216eb7259eb77cf3b0c5a4f5bc546efedb"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"DarkFranX"}}