{"action":"created","comment":{"url":"https://api.github.com/repos/mitodl/micromasters/pulls/comments/79055707","id":79055707,"diff_hunk":"@@ -0,0 +1,63 @@\n+\"\"\"\n+Factories for financialaid tests\n+\"\"\"\n+import datetime\n+from factory import SubFactory\n+\n+from factory.django import DjangoModelFactory\n+from factory.fuzzy import (\n+    FuzzyAttribute,\n+    FuzzyInteger,\n+    FuzzyText,\n+    FuzzyChoice, FuzzyFloat, FuzzyDateTime)\n+import faker\n+from pytz import UTC\n+\n+from courses.factories import ProgramFactory\n+from financialaid.models import TierProgram, Tier, FinancialAidStatus, FinancialAid\n+from profiles.factories import UserFactory\n+\n+\n+FAKE = faker.Factory.create()\n+\n+\n+class TierFactory(DjangoModelFactory):\n+    \"\"\"\n+    Factory for Tier\n+    \"\"\"\n+    name = FuzzyText()\n+    description = FuzzyText()\n+\n+    class Meta:  # pylint: disable=missing-docstring, no-init, too-few-public-methods, old-style-class","path":"financialaid/factories.py","position":31,"original_position":31,"commit_id":"8ac0507e417175c96af2db6b2e26288f2a852e1a","original_commit_id":"8ac0507e417175c96af2db6b2e26288f2a852e1a","user":{"login":"giocalitri","id":1005204,"avatar_url":"https://avatars.githubusercontent.com/u/1005204?v=3","gravatar_id":"","url":"https://api.github.com/users/giocalitri","html_url":"https://github.com/giocalitri","followers_url":"https://api.github.com/users/giocalitri/followers","following_url":"https://api.github.com/users/giocalitri/following{/other_user}","gists_url":"https://api.github.com/users/giocalitri/gists{/gist_id}","starred_url":"https://api.github.com/users/giocalitri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/giocalitri/subscriptions","organizations_url":"https://api.github.com/users/giocalitri/orgs","repos_url":"https://api.github.com/users/giocalitri/repos","events_url":"https://api.github.com/users/giocalitri/events{/privacy}","received_events_url":"https://api.github.com/users/giocalitri/received_events","type":"User","site_admin":false},"body":"is it really failing the pylint for `missing-docstring, no-init, too-few-public-methods, old-style-class` ?","created_at":"2016-09-15T20:35:25Z","updated_at":"2016-09-15T20:35:25Z","html_url":"https://github.com/mitodl/micromasters/pull/1053#discussion_r79055707","pull_request_url":"https://api.github.com/repos/mitodl/micromasters/pulls/1053","_links":{"self":{"href":"https://api.github.com/repos/mitodl/micromasters/pulls/comments/79055707"},"html":{"href":"https://github.com/mitodl/micromasters/pull/1053#discussion_r79055707"},"pull_request":{"href":"https://api.github.com/repos/mitodl/micromasters/pulls/1053"}}},"pull_request":{"url":"https://api.github.com/repos/mitodl/micromasters/pulls/1053","id":85461116,"html_url":"https://github.com/mitodl/micromasters/pull/1053","diff_url":"https://github.com/mitodl/micromasters/pull/1053.diff","patch_url":"https://github.com/mitodl/micromasters/pull/1053.patch","issue_url":"https://api.github.com/repos/mitodl/micromasters/issues/1053","number":1053,"state":"open","locked":false,"title":"Zagaran/financialaid","user":{"login":"alvinsiu","id":1454606,"avatar_url":"https://avatars.githubusercontent.com/u/1454606?v=3","gravatar_id":"","url":"https://api.github.com/users/alvinsiu","html_url":"https://github.com/alvinsiu","followers_url":"https://api.github.com/users/alvinsiu/followers","following_url":"https://api.github.com/users/alvinsiu/following{/other_user}","gists_url":"https://api.github.com/users/alvinsiu/gists{/gist_id}","starred_url":"https://api.github.com/users/alvinsiu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alvinsiu/subscriptions","organizations_url":"https://api.github.com/users/alvinsiu/orgs","repos_url":"https://api.github.com/users/alvinsiu/repos","events_url":"https://api.github.com/users/alvinsiu/events{/privacy}","received_events_url":"https://api.github.com/users/alvinsiu/received_events","type":"User","site_admin":false},"body":"#### What are the relevant tickets?\r\n#1041 - tests are included\r\n\r\n#### What's this PR do?\r\n> API endpoint for new financial aid request (takes income and currency) we can focus on USD for now\r\n\r\nThe endpoint (currently `reverse(\"financialaid_api\")`) takes \"original_currency\", \"original_income\", and \"program_id\".  Currenly only \"USD\" is valid for \"original_currency\".\r\n\r\n> Calculation of pending financial aid tier\r\n\r\nThis is in financialaid.backend: `determine_tier_program(program, income)`\r\n\r\n> Auto acceptance criteria for requests\r\n\r\nThis is in financialaid.backend: `determine_auto_approval(financial_aid)`.\r\n\r\n> Import of per-country thresholds for auto acceptance; these will be global for all programs\r\n\r\nThe data for country to income threshold is loaded in financialaid.constants into a constant `COUNTRY_INCOME_THRESHOLDS`, which reads the a csv file from data.\r\n\r\n#### Where should the reviewer start?\r\nThe crux of the functionality is in financialaid.serializers and financialaid.backend.\r\n\r\n#### How should this be manually tested?\r\n\r\n#### Any background context you want to provide?\r\n\r\n#### Screenshots (if appropriate)\r\n\r\n#### What GIF best describes this PR or how it makes you feel?\r\n","created_at":"2016-09-15T19:03:13Z","updated_at":"2016-09-15T20:35:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f026dce558fa99129cb5d7459bbdf66c9e779226","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/mitodl/micromasters/pulls/1053/commits","review_comments_url":"https://api.github.com/repos/mitodl/micromasters/pulls/1053/comments","review_comment_url":"https://api.github.com/repos/mitodl/micromasters/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mitodl/micromasters/issues/1053/comments","statuses_url":"https://api.github.com/repos/mitodl/micromasters/statuses/8ac0507e417175c96af2db6b2e26288f2a852e1a","head":{"label":"mitodl:zagaran/financialaid","ref":"zagaran/financialaid","sha":"8ac0507e417175c96af2db6b2e26288f2a852e1a","user":{"login":"mitodl","id":7918516,"avatar_url":"https://avatars.githubusercontent.com/u/7918516?v=3","gravatar_id":"","url":"https://api.github.com/users/mitodl","html_url":"https://github.com/mitodl","followers_url":"https://api.github.com/users/mitodl/followers","following_url":"https://api.github.com/users/mitodl/following{/other_user}","gists_url":"https://api.github.com/users/mitodl/gists{/gist_id}","starred_url":"https://api.github.com/users/mitodl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitodl/subscriptions","organizations_url":"https://api.github.com/users/mitodl/orgs","repos_url":"https://api.github.com/users/mitodl/repos","events_url":"https://api.github.com/users/mitodl/events{/privacy}","received_events_url":"https://api.github.com/users/mitodl/received_events","type":"Organization","site_admin":false},"repo":{"id":52919185,"name":"micromasters","full_name":"mitodl/micromasters","owner":{"login":"mitodl","id":7918516,"avatar_url":"https://avatars.githubusercontent.com/u/7918516?v=3","gravatar_id":"","url":"https://api.github.com/users/mitodl","html_url":"https://github.com/mitodl","followers_url":"https://api.github.com/users/mitodl/followers","following_url":"https://api.github.com/users/mitodl/following{/other_user}","gists_url":"https://api.github.com/users/mitodl/gists{/gist_id}","starred_url":"https://api.github.com/users/mitodl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitodl/subscriptions","organizations_url":"https://api.github.com/users/mitodl/orgs","repos_url":"https://api.github.com/users/mitodl/repos","events_url":"https://api.github.com/users/mitodl/events{/privacy}","received_events_url":"https://api.github.com/users/mitodl/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mitodl/micromasters","description":"Portal for learners and course teams to access MITx micromasters programs: https://goo.gl/tsUTSO","fork":false,"url":"https://api.github.com/repos/mitodl/micromasters","forks_url":"https://api.github.com/repos/mitodl/micromasters/forks","keys_url":"https://api.github.com/repos/mitodl/micromasters/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mitodl/micromasters/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mitodl/micromasters/teams","hooks_url":"https://api.github.com/repos/mitodl/micromasters/hooks","issue_events_url":"https://api.github.com/repos/mitodl/micromasters/issues/events{/number}","events_url":"https://api.github.com/repos/mitodl/micromasters/events","assignees_url":"https://api.github.com/repos/mitodl/micromasters/assignees{/user}","branches_url":"https://api.github.com/repos/mitodl/micromasters/branches{/branch}","tags_url":"https://api.github.com/repos/mitodl/micromasters/tags","blobs_url":"https://api.github.com/repos/mitodl/micromasters/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mitodl/micromasters/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mitodl/micromasters/git/refs{/sha}","trees_url":"https://api.github.com/repos/mitodl/micromasters/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mitodl/micromasters/statuses/{sha}","languages_url":"https://api.github.com/repos/mitodl/micromasters/languages","stargazers_url":"https://api.github.com/repos/mitodl/micromasters/stargazers","contributors_url":"https://api.github.com/repos/mitodl/micromasters/contributors","subscribers_url":"https://api.github.com/repos/mitodl/micromasters/subscribers","subscription_url":"https://api.github.com/repos/mitodl/micromasters/subscription","commits_url":"https://api.github.com/repos/mitodl/micromasters/commits{/sha}","git_commits_url":"https://api.github.com/repos/mitodl/micromasters/git/commits{/sha}","comments_url":"https://api.github.com/repos/mitodl/micromasters/comments{/number}","issue_comment_url":"https://api.github.com/repos/mitodl/micromasters/issues/comments{/number}","contents_url":"https://api.github.com/repos/mitodl/micromasters/contents/{+path}","compare_url":"https://api.github.com/repos/mitodl/micromasters/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mitodl/micromasters/merges","archive_url":"https://api.github.com/repos/mitodl/micromasters/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mitodl/micromasters/downloads","issues_url":"https://api.github.com/repos/mitodl/micromasters/issues{/number}","pulls_url":"https://api.github.com/repos/mitodl/micromasters/pulls{/number}","milestones_url":"https://api.github.com/repos/mitodl/micromasters/milestones{/number}","notifications_url":"https://api.github.com/repos/mitodl/micromasters/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mitodl/micromasters/labels{/name}","releases_url":"https://api.github.com/repos/mitodl/micromasters/releases{/id}","deployments_url":"https://api.github.com/repos/mitodl/micromasters/deployments","created_at":"2016-03-01T23:53:17Z","updated_at":"2016-08-19T01:46:48Z","pushed_at":"2016-09-15T19:45:39Z","git_url":"git://github.com/mitodl/micromasters.git","ssh_url":"git@github.com:mitodl/micromasters.git","clone_url":"https://github.com/mitodl/micromasters.git","svn_url":"https://github.com/mitodl/micromasters","homepage":"","size":11957,"stargazers_count":5,"watchers_count":5,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":163,"forks":2,"open_issues":163,"watchers":5,"default_branch":"master"}},"base":{"label":"mitodl:master","ref":"master","sha":"0a99f68954985d065f36db79f570636a3d35a3ab","user":{"login":"mitodl","id":7918516,"avatar_url":"https://avatars.githubusercontent.com/u/7918516?v=3","gravatar_id":"","url":"https://api.github.com/users/mitodl","html_url":"https://github.com/mitodl","followers_url":"https://api.github.com/users/mitodl/followers","following_url":"https://api.github.com/users/mitodl/following{/other_user}","gists_url":"https://api.github.com/users/mitodl/gists{/gist_id}","starred_url":"https://api.github.com/users/mitodl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitodl/subscriptions","organizations_url":"https://api.github.com/users/mitodl/orgs","repos_url":"https://api.github.com/users/mitodl/repos","events_url":"https://api.github.com/users/mitodl/events{/privacy}","received_events_url":"https://api.github.com/users/mitodl/received_events","type":"Organization","site_admin":false},"repo":{"id":52919185,"name":"micromasters","full_name":"mitodl/micromasters","owner":{"login":"mitodl","id":7918516,"avatar_url":"https://avatars.githubusercontent.com/u/7918516?v=3","gravatar_id":"","url":"https://api.github.com/users/mitodl","html_url":"https://github.com/mitodl","followers_url":"https://api.github.com/users/mitodl/followers","following_url":"https://api.github.com/users/mitodl/following{/other_user}","gists_url":"https://api.github.com/users/mitodl/gists{/gist_id}","starred_url":"https://api.github.com/users/mitodl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitodl/subscriptions","organizations_url":"https://api.github.com/users/mitodl/orgs","repos_url":"https://api.github.com/users/mitodl/repos","events_url":"https://api.github.com/users/mitodl/events{/privacy}","received_events_url":"https://api.github.com/users/mitodl/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mitodl/micromasters","description":"Portal for learners and course teams to access MITx micromasters programs: https://goo.gl/tsUTSO","fork":false,"url":"https://api.github.com/repos/mitodl/micromasters","forks_url":"https://api.github.com/repos/mitodl/micromasters/forks","keys_url":"https://api.github.com/repos/mitodl/micromasters/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mitodl/micromasters/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mitodl/micromasters/teams","hooks_url":"https://api.github.com/repos/mitodl/micromasters/hooks","issue_events_url":"https://api.github.com/repos/mitodl/micromasters/issues/events{/number}","events_url":"https://api.github.com/repos/mitodl/micromasters/events","assignees_url":"https://api.github.com/repos/mitodl/micromasters/assignees{/user}","branches_url":"https://api.github.com/repos/mitodl/micromasters/branches{/branch}","tags_url":"https://api.github.com/repos/mitodl/micromasters/tags","blobs_url":"https://api.github.com/repos/mitodl/micromasters/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mitodl/micromasters/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mitodl/micromasters/git/refs{/sha}","trees_url":"https://api.github.com/repos/mitodl/micromasters/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mitodl/micromasters/statuses/{sha}","languages_url":"https://api.github.com/repos/mitodl/micromasters/languages","stargazers_url":"https://api.github.com/repos/mitodl/micromasters/stargazers","contributors_url":"https://api.github.com/repos/mitodl/micromasters/contributors","subscribers_url":"https://api.github.com/repos/mitodl/micromasters/subscribers","subscription_url":"https://api.github.com/repos/mitodl/micromasters/subscription","commits_url":"https://api.github.com/repos/mitodl/micromasters/commits{/sha}","git_commits_url":"https://api.github.com/repos/mitodl/micromasters/git/commits{/sha}","comments_url":"https://api.github.com/repos/mitodl/micromasters/comments{/number}","issue_comment_url":"https://api.github.com/repos/mitodl/micromasters/issues/comments{/number}","contents_url":"https://api.github.com/repos/mitodl/micromasters/contents/{+path}","compare_url":"https://api.github.com/repos/mitodl/micromasters/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mitodl/micromasters/merges","archive_url":"https://api.github.com/repos/mitodl/micromasters/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mitodl/micromasters/downloads","issues_url":"https://api.github.com/repos/mitodl/micromasters/issues{/number}","pulls_url":"https://api.github.com/repos/mitodl/micromasters/pulls{/number}","milestones_url":"https://api.github.com/repos/mitodl/micromasters/milestones{/number}","notifications_url":"https://api.github.com/repos/mitodl/micromasters/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mitodl/micromasters/labels{/name}","releases_url":"https://api.github.com/repos/mitodl/micromasters/releases{/id}","deployments_url":"https://api.github.com/repos/mitodl/micromasters/deployments","created_at":"2016-03-01T23:53:17Z","updated_at":"2016-08-19T01:46:48Z","pushed_at":"2016-09-15T19:45:39Z","git_url":"git://github.com/mitodl/micromasters.git","ssh_url":"git@github.com:mitodl/micromasters.git","clone_url":"https://github.com/mitodl/micromasters.git","svn_url":"https://github.com/mitodl/micromasters","homepage":"","size":11957,"stargazers_count":5,"watchers_count":5,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":163,"forks":2,"open_issues":163,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mitodl/micromasters/pulls/1053"},"html":{"href":"https://github.com/mitodl/micromasters/pull/1053"},"issue":{"href":"https://api.github.com/repos/mitodl/micromasters/issues/1053"},"comments":{"href":"https://api.github.com/repos/mitodl/micromasters/issues/1053/comments"},"review_comments":{"href":"https://api.github.com/repos/mitodl/micromasters/pulls/1053/comments"},"review_comment":{"href":"https://api.github.com/repos/mitodl/micromasters/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mitodl/micromasters/pulls/1053/commits"},"statuses":{"href":"https://api.github.com/repos/mitodl/micromasters/statuses/8ac0507e417175c96af2db6b2e26288f2a852e1a"}}}}
{"actor":{"display_login":"giocalitri"}}