{"action":"created","comment":{"url":"https://api.github.com/repos/edx/programs/pulls/comments/44012139","id":44012139,"diff_hunk":"@@ -170,10 +175,22 @@ def test_organization(self):\n         )\n \n \n+@ddt.ddt\n class TestProgramCourseRunMode(TestCase):\n     \"\"\"\n     Tests for the ProgramCourseRunMode model.\n     \"\"\"\n+    def setUp(self):\n+        \"\"\"\n+        DRY object initializations.\n+        \"\"\"\n+        self.program = factories.ProgramFactory.create()\n+        self.org = factories.OrganizationFactory.create()\n+        factories.ProgramOrganizationFactory.create(program=self.program, organization=self.org)\n+        self.course_code = factories.CourseCodeFactory.create(organization=self.org)\n+        self.pgm_course = factories.ProgramCourseCodeFactory.create(program=self.program, course_code=self.course_code)","path":"programs/apps/programs/tests/test_models.py","position":29,"original_position":29,"commit_id":"3aca00ace893b2a6e9b19859131c1bb4c4491a27","original_commit_id":"3aca00ace893b2a6e9b19859131c1bb4c4491a27","user":{"login":"zubair-arbi","id":5072991,"avatar_url":"https://avatars.githubusercontent.com/u/5072991?v=3","gravatar_id":"","url":"https://api.github.com/users/zubair-arbi","html_url":"https://github.com/zubair-arbi","followers_url":"https://api.github.com/users/zubair-arbi/followers","following_url":"https://api.github.com/users/zubair-arbi/following{/other_user}","gists_url":"https://api.github.com/users/zubair-arbi/gists{/gist_id}","starred_url":"https://api.github.com/users/zubair-arbi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zubair-arbi/subscriptions","organizations_url":"https://api.github.com/users/zubair-arbi/orgs","repos_url":"https://api.github.com/users/zubair-arbi/repos","events_url":"https://api.github.com/users/zubair-arbi/events{/privacy}","received_events_url":"https://api.github.com/users/zubair-arbi/received_events","type":"User","site_admin":false},"body":"nit: `self.pgm_course` -> `self.program_course `","created_at":"2015-11-05T13:45:41Z","updated_at":"2015-11-05T13:45:41Z","html_url":"https://github.com/edx/programs/pull/29#discussion_r44012139","pull_request_url":"https://api.github.com/repos/edx/programs/pulls/29","_links":{"self":{"href":"https://api.github.com/repos/edx/programs/pulls/comments/44012139"},"html":{"href":"https://github.com/edx/programs/pull/29#discussion_r44012139"},"pull_request":{"href":"https://api.github.com/repos/edx/programs/pulls/29"}}},"pull_request":{"url":"https://api.github.com/repos/edx/programs/pulls/29","id":49674548,"html_url":"https://github.com/edx/programs/pull/29","diff_url":"https://github.com/edx/programs/pull/29.diff","patch_url":"https://github.com/edx/programs/pull/29.patch","issue_url":"https://api.github.com/repos/edx/programs/issues/29","number":29,"state":"open","locked":false,"title":"Adding the new fields in model , update the test cases accordingly.","user":{"login":"awais786","id":445320,"avatar_url":"https://avatars.githubusercontent.com/u/445320?v=3","gravatar_id":"","url":"https://api.github.com/users/awais786","html_url":"https://github.com/awais786","followers_url":"https://api.github.com/users/awais786/followers","following_url":"https://api.github.com/users/awais786/following{/other_user}","gists_url":"https://api.github.com/users/awais786/gists{/gist_id}","starred_url":"https://api.github.com/users/awais786/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/awais786/subscriptions","organizations_url":"https://api.github.com/users/awais786/orgs","repos_url":"https://api.github.com/users/awais786/repos","events_url":"https://api.github.com/users/awais786/events{/privacy}","received_events_url":"https://api.github.com/users/awais786/received_events","type":"User","site_admin":false},"body":"[ECOM-2637](https://openedx.atlassian.net/browse/ECOM-2637)\r\n\r\n* Added two new fields in ProgramCourseRunMode model\r\n   * start_date \r\n   * run_key\r\n\r\n* New Json look like\r\n```javascript\r\n\"run_modes\": [\r\n    {\r\n        \"course_key\": \"edX/DemoX/Demo_Course\",\r\n        \"mode_slug\": \"edxslug\",\r\n        \"sku\": \"111\",\r\n        \"start_date\": \"2015-11-04T08:46:47Z\",\r\n        \"run_key\": \"abc\"\r\n    }\r\n]\r\n```\r\n* Update the ProgramCourseRunModeFactory \r\n* Update the test case to reflect the new json changes.\r\n* Add the opaque key in this repo.\r\n* Parse the run_key from course_key in save method.\r\n","created_at":"2015-11-04T11:01:21Z","updated_at":"2015-11-05T13:45:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"966e6b262553cba4a71416162d7867ef7e816f10","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/edx/programs/pulls/29/commits","review_comments_url":"https://api.github.com/repos/edx/programs/pulls/29/comments","review_comment_url":"https://api.github.com/repos/edx/programs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/edx/programs/issues/29/comments","statuses_url":"https://api.github.com/repos/edx/programs/statuses/3aca00ace893b2a6e9b19859131c1bb4c4491a27","head":{"label":"edx:awais786/ECOM-2637-new-fields-in-ProgramCourseRunMode","ref":"awais786/ECOM-2637-new-fields-in-ProgramCourseRunMode","sha":"3aca00ace893b2a6e9b19859131c1bb4c4491a27","user":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"repo":{"id":42223848,"name":"programs","full_name":"edx/programs","owner":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/edx/programs","description":"Django application used as the backend to support Programs-based product lines such as edX's XSeries offering.","fork":false,"url":"https://api.github.com/repos/edx/programs","forks_url":"https://api.github.com/repos/edx/programs/forks","keys_url":"https://api.github.com/repos/edx/programs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edx/programs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edx/programs/teams","hooks_url":"https://api.github.com/repos/edx/programs/hooks","issue_events_url":"https://api.github.com/repos/edx/programs/issues/events{/number}","events_url":"https://api.github.com/repos/edx/programs/events","assignees_url":"https://api.github.com/repos/edx/programs/assignees{/user}","branches_url":"https://api.github.com/repos/edx/programs/branches{/branch}","tags_url":"https://api.github.com/repos/edx/programs/tags","blobs_url":"https://api.github.com/repos/edx/programs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edx/programs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edx/programs/git/refs{/sha}","trees_url":"https://api.github.com/repos/edx/programs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edx/programs/statuses/{sha}","languages_url":"https://api.github.com/repos/edx/programs/languages","stargazers_url":"https://api.github.com/repos/edx/programs/stargazers","contributors_url":"https://api.github.com/repos/edx/programs/contributors","subscribers_url":"https://api.github.com/repos/edx/programs/subscribers","subscription_url":"https://api.github.com/repos/edx/programs/subscription","commits_url":"https://api.github.com/repos/edx/programs/commits{/sha}","git_commits_url":"https://api.github.com/repos/edx/programs/git/commits{/sha}","comments_url":"https://api.github.com/repos/edx/programs/comments{/number}","issue_comment_url":"https://api.github.com/repos/edx/programs/issues/comments{/number}","contents_url":"https://api.github.com/repos/edx/programs/contents/{+path}","compare_url":"https://api.github.com/repos/edx/programs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edx/programs/merges","archive_url":"https://api.github.com/repos/edx/programs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edx/programs/downloads","issues_url":"https://api.github.com/repos/edx/programs/issues{/number}","pulls_url":"https://api.github.com/repos/edx/programs/pulls{/number}","milestones_url":"https://api.github.com/repos/edx/programs/milestones{/number}","notifications_url":"https://api.github.com/repos/edx/programs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edx/programs/labels{/name}","releases_url":"https://api.github.com/repos/edx/programs/releases{/id}","created_at":"2015-09-10T05:22:07Z","updated_at":"2015-11-02T21:19:30Z","pushed_at":"2015-11-05T13:34:26Z","git_url":"git://github.com/edx/programs.git","ssh_url":"git@github.com:edx/programs.git","clone_url":"https://github.com/edx/programs.git","svn_url":"https://github.com/edx/programs","homepage":"http://open-edx-programs-guide.readthedocs.org/en/latest/","size":916,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"edx:master","ref":"master","sha":"b7fe41411e6c0db2976599de45430fc7fb4dad38","user":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"repo":{"id":42223848,"name":"programs","full_name":"edx/programs","owner":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/edx/programs","description":"Django application used as the backend to support Programs-based product lines such as edX's XSeries offering.","fork":false,"url":"https://api.github.com/repos/edx/programs","forks_url":"https://api.github.com/repos/edx/programs/forks","keys_url":"https://api.github.com/repos/edx/programs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edx/programs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edx/programs/teams","hooks_url":"https://api.github.com/repos/edx/programs/hooks","issue_events_url":"https://api.github.com/repos/edx/programs/issues/events{/number}","events_url":"https://api.github.com/repos/edx/programs/events","assignees_url":"https://api.github.com/repos/edx/programs/assignees{/user}","branches_url":"https://api.github.com/repos/edx/programs/branches{/branch}","tags_url":"https://api.github.com/repos/edx/programs/tags","blobs_url":"https://api.github.com/repos/edx/programs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edx/programs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edx/programs/git/refs{/sha}","trees_url":"https://api.github.com/repos/edx/programs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edx/programs/statuses/{sha}","languages_url":"https://api.github.com/repos/edx/programs/languages","stargazers_url":"https://api.github.com/repos/edx/programs/stargazers","contributors_url":"https://api.github.com/repos/edx/programs/contributors","subscribers_url":"https://api.github.com/repos/edx/programs/subscribers","subscription_url":"https://api.github.com/repos/edx/programs/subscription","commits_url":"https://api.github.com/repos/edx/programs/commits{/sha}","git_commits_url":"https://api.github.com/repos/edx/programs/git/commits{/sha}","comments_url":"https://api.github.com/repos/edx/programs/comments{/number}","issue_comment_url":"https://api.github.com/repos/edx/programs/issues/comments{/number}","contents_url":"https://api.github.com/repos/edx/programs/contents/{+path}","compare_url":"https://api.github.com/repos/edx/programs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edx/programs/merges","archive_url":"https://api.github.com/repos/edx/programs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edx/programs/downloads","issues_url":"https://api.github.com/repos/edx/programs/issues{/number}","pulls_url":"https://api.github.com/repos/edx/programs/pulls{/number}","milestones_url":"https://api.github.com/repos/edx/programs/milestones{/number}","notifications_url":"https://api.github.com/repos/edx/programs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edx/programs/labels{/name}","releases_url":"https://api.github.com/repos/edx/programs/releases{/id}","created_at":"2015-09-10T05:22:07Z","updated_at":"2015-11-02T21:19:30Z","pushed_at":"2015-11-05T13:34:26Z","git_url":"git://github.com/edx/programs.git","ssh_url":"git@github.com:edx/programs.git","clone_url":"https://github.com/edx/programs.git","svn_url":"https://github.com/edx/programs","homepage":"http://open-edx-programs-guide.readthedocs.org/en/latest/","size":916,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/edx/programs/pulls/29"},"html":{"href":"https://github.com/edx/programs/pull/29"},"issue":{"href":"https://api.github.com/repos/edx/programs/issues/29"},"comments":{"href":"https://api.github.com/repos/edx/programs/issues/29/comments"},"review_comments":{"href":"https://api.github.com/repos/edx/programs/pulls/29/comments"},"review_comment":{"href":"https://api.github.com/repos/edx/programs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/edx/programs/pulls/29/commits"},"statuses":{"href":"https://api.github.com/repos/edx/programs/statuses/3aca00ace893b2a6e9b19859131c1bb4c4491a27"}}}}