{"action":"created","comment":{"url":"https://api.github.com/repos/edx/ecommerce/pulls/comments/211327899","pull_request_review_id":147724930,"id":211327899,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMTMyNzg5OQ==","diff_hunk":"@@ -0,0 +1,92 @@\n+\"\"\"\n+Tests for Django management command to verify ecommerce transactions.\n+\"\"\"\n+import datetime\n+\n+import pytz\n+from django.core.management import call_command\n+from django.core.management.base import CommandError\n+from django.test import TestCase\n+from oscar.core.loading import get_class, get_model\n+from oscar.test.factories import OrderFactory\n+\n+from ecommerce.core.management.commands.tests.factories import PaymentEventFactory\n+\n+Order = get_model('order', 'Order')\n+PaymentEvent = get_model('order', 'PaymentEvent')\n+PaymentEventType = get_model('order', 'PaymentEventType')\n+PaymentEventTypeName = get_class('order.constants', 'PaymentEventTypeName')\n+\n+\n+class VerifyTransactionsTest(TestCase):\n+\n+    def setUp(self):\n+        self.payevent = PaymentEventType.objects.get_or_create(name=PaymentEventTypeName.PAID)\n+        self.timestamp = datetime.datetime.now(pytz.utc) - datetime.timedelta(hours=1, minutes=30)\n+\n+    def tearDown(self):\n+        Order.objects.all().delete()\n+\n+    def test_no_errors(self):\n+        \"\"\"Test verify_transactions with order and payment of same amount.\"\"\"\n+        order = OrderFactory()\n+        order.total_incl_tax = 100\n+        order.date_placed = self.timestamp\n+        order.save()\n+        payment = PaymentEventFactory(order=order, amount=100, event_type_id=self.payevent[0].id)","path":"ecommerce/core/management/commands/tests/test_verify_transactions.py","position":36,"original_position":36,"commit_id":"6615be48700c3fe599782f347387e67755e53807","original_commit_id":"6615be48700c3fe599782f347387e67755e53807","user":{"login":"BenjiLee","id":7101723,"node_id":"MDQ6VXNlcjcxMDE3MjM=","avatar_url":"https://avatars1.githubusercontent.com/u/7101723?v=4","gravatar_id":"","url":"https://api.github.com/users/BenjiLee","html_url":"https://github.com/BenjiLee","followers_url":"https://api.github.com/users/BenjiLee/followers","following_url":"https://api.github.com/users/BenjiLee/following{/other_user}","gists_url":"https://api.github.com/users/BenjiLee/gists{/gist_id}","starred_url":"https://api.github.com/users/BenjiLee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BenjiLee/subscriptions","organizations_url":"https://api.github.com/users/BenjiLee/orgs","repos_url":"https://api.github.com/users/BenjiLee/repos","events_url":"https://api.github.com/users/BenjiLee/events{/privacy}","received_events_url":"https://api.github.com/users/BenjiLee/received_events","type":"User","site_admin":false},"body":"Same shortening comment as Order() above.","created_at":"2018-08-20T16:34:12Z","updated_at":"2018-08-20T16:34:12Z","html_url":"https://github.com/edx/ecommerce/pull/1881#discussion_r211327899","pull_request_url":"https://api.github.com/repos/edx/ecommerce/pulls/1881","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/edx/ecommerce/pulls/comments/211327899"},"html":{"href":"https://github.com/edx/ecommerce/pull/1881#discussion_r211327899"},"pull_request":{"href":"https://api.github.com/repos/edx/ecommerce/pulls/1881"}}},"pull_request":{"url":"https://api.github.com/repos/edx/ecommerce/pulls/1881","id":209233990,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA5MjMzOTkw","html_url":"https://github.com/edx/ecommerce/pull/1881","diff_url":"https://github.com/edx/ecommerce/pull/1881.diff","patch_url":"https://github.com/edx/ecommerce/pull/1881.patch","issue_url":"https://api.github.com/repos/edx/ecommerce/issues/1881","number":1881,"state":"open","locked":false,"title":"Added verify transactions management command to ensure orders and pay…","user":{"login":"calistenson","id":5911407,"node_id":"MDQ6VXNlcjU5MTE0MDc=","avatar_url":"https://avatars1.githubusercontent.com/u/5911407?v=4","gravatar_id":"","url":"https://api.github.com/users/calistenson","html_url":"https://github.com/calistenson","followers_url":"https://api.github.com/users/calistenson/followers","following_url":"https://api.github.com/users/calistenson/following{/other_user}","gists_url":"https://api.github.com/users/calistenson/gists{/gist_id}","starred_url":"https://api.github.com/users/calistenson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/calistenson/subscriptions","organizations_url":"https://api.github.com/users/calistenson/orgs","repos_url":"https://api.github.com/users/calistenson/repos","events_url":"https://api.github.com/users/calistenson/events{/privacy}","received_events_url":"https://api.github.com/users/calistenson/received_events","type":"User","site_admin":false},"body":"…ments match.","created_at":"2018-08-17T19:11:49Z","updated_at":"2018-08-20T16:34:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7a9bf16b393eee74a66398673dbb86fbb74a97ce","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/edx/ecommerce/pulls/1881/commits","review_comments_url":"https://api.github.com/repos/edx/ecommerce/pulls/1881/comments","review_comment_url":"https://api.github.com/repos/edx/ecommerce/pulls/comments{/number}","comments_url":"https://api.github.com/repos/edx/ecommerce/issues/1881/comments","statuses_url":"https://api.github.com/repos/edx/ecommerce/statuses/6615be48700c3fe599782f347387e67755e53807","head":{"label":"edx:cstenson/command_verify_transactions","ref":"cstenson/command_verify_transactions","sha":"6615be48700c3fe599782f347387e67755e53807","user":{"login":"edx","id":3179841,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMxNzk4NDE=","avatar_url":"https://avatars3.githubusercontent.com/u/3179841?v=4","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":30175039,"node_id":"MDEwOlJlcG9zaXRvcnkzMDE3NTAzOQ==","name":"ecommerce","full_name":"edx/ecommerce","owner":{"login":"edx","id":3179841,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMxNzk4NDE=","avatar_url":"https://avatars3.githubusercontent.com/u/3179841?v=4","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/ecommerce","description":"Service for managing edX's product catalog and handling orders for those products","fork":false,"url":"https://api.github.com/repos/edx/ecommerce","forks_url":"https://api.github.com/repos/edx/ecommerce/forks","keys_url":"https://api.github.com/repos/edx/ecommerce/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edx/ecommerce/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edx/ecommerce/teams","hooks_url":"https://api.github.com/repos/edx/ecommerce/hooks","issue_events_url":"https://api.github.com/repos/edx/ecommerce/issues/events{/number}","events_url":"https://api.github.com/repos/edx/ecommerce/events","assignees_url":"https://api.github.com/repos/edx/ecommerce/assignees{/user}","branches_url":"https://api.github.com/repos/edx/ecommerce/branches{/branch}","tags_url":"https://api.github.com/repos/edx/ecommerce/tags","blobs_url":"https://api.github.com/repos/edx/ecommerce/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edx/ecommerce/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edx/ecommerce/git/refs{/sha}","trees_url":"https://api.github.com/repos/edx/ecommerce/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edx/ecommerce/statuses/{sha}","languages_url":"https://api.github.com/repos/edx/ecommerce/languages","stargazers_url":"https://api.github.com/repos/edx/ecommerce/stargazers","contributors_url":"https://api.github.com/repos/edx/ecommerce/contributors","subscribers_url":"https://api.github.com/repos/edx/ecommerce/subscribers","subscription_url":"https://api.github.com/repos/edx/ecommerce/subscription","commits_url":"https://api.github.com/repos/edx/ecommerce/commits{/sha}","git_commits_url":"https://api.github.com/repos/edx/ecommerce/git/commits{/sha}","comments_url":"https://api.github.com/repos/edx/ecommerce/comments{/number}","issue_comment_url":"https://api.github.com/repos/edx/ecommerce/issues/comments{/number}","contents_url":"https://api.github.com/repos/edx/ecommerce/contents/{+path}","compare_url":"https://api.github.com/repos/edx/ecommerce/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edx/ecommerce/merges","archive_url":"https://api.github.com/repos/edx/ecommerce/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edx/ecommerce/downloads","issues_url":"https://api.github.com/repos/edx/ecommerce/issues{/number}","pulls_url":"https://api.github.com/repos/edx/ecommerce/pulls{/number}","milestones_url":"https://api.github.com/repos/edx/ecommerce/milestones{/number}","notifications_url":"https://api.github.com/repos/edx/ecommerce/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edx/ecommerce/labels{/name}","releases_url":"https://api.github.com/repos/edx/ecommerce/releases{/id}","deployments_url":"https://api.github.com/repos/edx/ecommerce/deployments","created_at":"2015-02-02T06:55:15Z","updated_at":"2018-08-20T13:46:00Z","pushed_at":"2018-08-20T15:06:48Z","git_url":"git://github.com/edx/ecommerce.git","ssh_url":"git@github.com:edx/ecommerce.git","clone_url":"https://github.com/edx/ecommerce.git","svn_url":"https://github.com/edx/ecommerce","homepage":"https://edx-ecommerce.readthedocs.io/en/latest/","size":14251,"stargazers_count":78,"watchers_count":78,"language":"Python","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":89,"mirror_url":null,"archived":false,"open_issues_count":10,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":89,"open_issues":10,"watchers":78,"default_branch":"master"}},"base":{"label":"edx:master","ref":"master","sha":"68bef4b6e58dca9ab7179bc47a6cff7c85fc67cb","user":{"login":"edx","id":3179841,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMxNzk4NDE=","avatar_url":"https://avatars3.githubusercontent.com/u/3179841?v=4","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":30175039,"node_id":"MDEwOlJlcG9zaXRvcnkzMDE3NTAzOQ==","name":"ecommerce","full_name":"edx/ecommerce","owner":{"login":"edx","id":3179841,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMxNzk4NDE=","avatar_url":"https://avatars3.githubusercontent.com/u/3179841?v=4","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/ecommerce","description":"Service for managing edX's product catalog and handling orders for those products","fork":false,"url":"https://api.github.com/repos/edx/ecommerce","forks_url":"https://api.github.com/repos/edx/ecommerce/forks","keys_url":"https://api.github.com/repos/edx/ecommerce/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edx/ecommerce/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edx/ecommerce/teams","hooks_url":"https://api.github.com/repos/edx/ecommerce/hooks","issue_events_url":"https://api.github.com/repos/edx/ecommerce/issues/events{/number}","events_url":"https://api.github.com/repos/edx/ecommerce/events","assignees_url":"https://api.github.com/repos/edx/ecommerce/assignees{/user}","branches_url":"https://api.github.com/repos/edx/ecommerce/branches{/branch}","tags_url":"https://api.github.com/repos/edx/ecommerce/tags","blobs_url":"https://api.github.com/repos/edx/ecommerce/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edx/ecommerce/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edx/ecommerce/git/refs{/sha}","trees_url":"https://api.github.com/repos/edx/ecommerce/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edx/ecommerce/statuses/{sha}","languages_url":"https://api.github.com/repos/edx/ecommerce/languages","stargazers_url":"https://api.github.com/repos/edx/ecommerce/stargazers","contributors_url":"https://api.github.com/repos/edx/ecommerce/contributors","subscribers_url":"https://api.github.com/repos/edx/ecommerce/subscribers","subscription_url":"https://api.github.com/repos/edx/ecommerce/subscription","commits_url":"https://api.github.com/repos/edx/ecommerce/commits{/sha}","git_commits_url":"https://api.github.com/repos/edx/ecommerce/git/commits{/sha}","comments_url":"https://api.github.com/repos/edx/ecommerce/comments{/number}","issue_comment_url":"https://api.github.com/repos/edx/ecommerce/issues/comments{/number}","contents_url":"https://api.github.com/repos/edx/ecommerce/contents/{+path}","compare_url":"https://api.github.com/repos/edx/ecommerce/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edx/ecommerce/merges","archive_url":"https://api.github.com/repos/edx/ecommerce/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edx/ecommerce/downloads","issues_url":"https://api.github.com/repos/edx/ecommerce/issues{/number}","pulls_url":"https://api.github.com/repos/edx/ecommerce/pulls{/number}","milestones_url":"https://api.github.com/repos/edx/ecommerce/milestones{/number}","notifications_url":"https://api.github.com/repos/edx/ecommerce/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edx/ecommerce/labels{/name}","releases_url":"https://api.github.com/repos/edx/ecommerce/releases{/id}","deployments_url":"https://api.github.com/repos/edx/ecommerce/deployments","created_at":"2015-02-02T06:55:15Z","updated_at":"2018-08-20T13:46:00Z","pushed_at":"2018-08-20T15:06:48Z","git_url":"git://github.com/edx/ecommerce.git","ssh_url":"git@github.com:edx/ecommerce.git","clone_url":"https://github.com/edx/ecommerce.git","svn_url":"https://github.com/edx/ecommerce","homepage":"https://edx-ecommerce.readthedocs.io/en/latest/","size":14251,"stargazers_count":78,"watchers_count":78,"language":"Python","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":89,"mirror_url":null,"archived":false,"open_issues_count":10,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":89,"open_issues":10,"watchers":78,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/edx/ecommerce/pulls/1881"},"html":{"href":"https://github.com/edx/ecommerce/pull/1881"},"issue":{"href":"https://api.github.com/repos/edx/ecommerce/issues/1881"},"comments":{"href":"https://api.github.com/repos/edx/ecommerce/issues/1881/comments"},"review_comments":{"href":"https://api.github.com/repos/edx/ecommerce/pulls/1881/comments"},"review_comment":{"href":"https://api.github.com/repos/edx/ecommerce/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/edx/ecommerce/pulls/1881/commits"},"statuses":{"href":"https://api.github.com/repos/edx/ecommerce/statuses/6615be48700c3fe599782f347387e67755e53807"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"BenjiLee"}}