{"action":"created","comment":{"url":"https://api.github.com/repos/uktrade/data-hub-leeloo/pulls/comments/137792800","pull_request_review_id":61508374,"id":137792800,"diff_hunk":"@@ -186,6 +271,24 @@ def test_with_already_cancelled_quote(self):\n             assert order.quote.cancelled_by == orig_cancelled_by\n             assert order.quote.cancelled_on == orig_cancelled_on\n \n+            assert order.status == OrderStatus.draft.value.id\n+\n+    @pytest.mark.parametrize(\n+        'disallowed_status',\n+        (\n+            OrderStatus.paid,\n+            OrderStatus.complete,\n+            OrderStatus.cancelled,\n+        )\n+    )\n+    def test_fails_if_order_not_in_allowed_status(self, disallowed_status):\n+        \"\"\"Test that if the order is in a disallowed status, it cannot be reopened.\"\"\"\n+        order = OrderFactory(status=disallowed_status.value.id)\n+        with pytest.raises(Conflict):\n+            order.generate_quote(by=None)","path":"datahub/omis/order/test/test_models.py","position":null,"original_position":158,"commit_id":"d07cb0e65e1d7849b371dd28276206e7f262caf7","original_commit_id":"13af25946adbe8abec4a5fb995bebe3e18dbfe4d","user":{"login":"marcofucci","id":178865,"avatar_url":"https://avatars3.githubusercontent.com/u/178865?v=4","gravatar_id":"","url":"https://api.github.com/users/marcofucci","html_url":"https://github.com/marcofucci","followers_url":"https://api.github.com/users/marcofucci/followers","following_url":"https://api.github.com/users/marcofucci/following{/other_user}","gists_url":"https://api.github.com/users/marcofucci/gists{/gist_id}","starred_url":"https://api.github.com/users/marcofucci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcofucci/subscriptions","organizations_url":"https://api.github.com/users/marcofucci/orgs","repos_url":"https://api.github.com/users/marcofucci/repos","events_url":"https://api.github.com/users/marcofucci/events{/privacy}","received_events_url":"https://api.github.com/users/marcofucci/received_events","type":"User","site_admin":false},"body":"👍  forgot","created_at":"2017-09-08T13:40:04Z","updated_at":"2017-09-08T13:40:04Z","html_url":"https://github.com/uktrade/data-hub-leeloo/pull/456#discussion_r137792800","pull_request_url":"https://api.github.com/repos/uktrade/data-hub-leeloo/pulls/456","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/uktrade/data-hub-leeloo/pulls/comments/137792800"},"html":{"href":"https://github.com/uktrade/data-hub-leeloo/pull/456#discussion_r137792800"},"pull_request":{"href":"https://api.github.com/repos/uktrade/data-hub-leeloo/pulls/456"}},"in_reply_to_id":137785945},"pull_request":{"url":"https://api.github.com/repos/uktrade/data-hub-leeloo/pulls/456","id":140006956,"html_url":"https://github.com/uktrade/data-hub-leeloo/pull/456","diff_url":"https://github.com/uktrade/data-hub-leeloo/pull/456.diff","patch_url":"https://github.com/uktrade/data-hub-leeloo/pull/456.patch","issue_url":"https://api.github.com/repos/uktrade/data-hub-leeloo/issues/456","number":456,"state":"open","locked":false,"title":"Add OMIS order status","user":{"login":"marcofucci","id":178865,"avatar_url":"https://avatars3.githubusercontent.com/u/178865?v=4","gravatar_id":"","url":"https://api.github.com/users/marcofucci","html_url":"https://github.com/marcofucci","followers_url":"https://api.github.com/users/marcofucci/followers","following_url":"https://api.github.com/users/marcofucci/following{/other_user}","gists_url":"https://api.github.com/users/marcofucci/gists{/gist_id}","starred_url":"https://api.github.com/users/marcofucci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcofucci/subscriptions","organizations_url":"https://api.github.com/users/marcofucci/orgs","repos_url":"https://api.github.com/users/marcofucci/repos","events_url":"https://api.github.com/users/marcofucci/events{/privacy}","received_events_url":"https://api.github.com/users/marcofucci/received_events","type":"User","site_admin":false},"body":"This:\r\n- adds a new `order.status` char field\r\n- adds `OrderStatus` enum constants\r\n- sets status to `draft` when an order is created\r\n- sets status to `quote_awaiting_acceptance` when a quote is created\r\n- sets status back to `draft` if an order is reopened\r\n- adds validation logic that you can create a quote or reopen an order only if the order is in the right state\r\n- includes the status value in the response body","created_at":"2017-09-08T10:42:37Z","updated_at":"2017-09-08T13:40:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3f77f280a81cbf97536d22e22ace7b5a4649012d","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/uktrade/data-hub-leeloo/pulls/456/commits","review_comments_url":"https://api.github.com/repos/uktrade/data-hub-leeloo/pulls/456/comments","review_comment_url":"https://api.github.com/repos/uktrade/data-hub-leeloo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/uktrade/data-hub-leeloo/issues/456/comments","statuses_url":"https://api.github.com/repos/uktrade/data-hub-leeloo/statuses/d07cb0e65e1d7849b371dd28276206e7f262caf7","head":{"label":"uktrade:omis-order-status","ref":"omis-order-status","sha":"d07cb0e65e1d7849b371dd28276206e7f262caf7","user":{"login":"uktrade","id":15107524,"avatar_url":"https://avatars2.githubusercontent.com/u/15107524?v=4","gravatar_id":"","url":"https://api.github.com/users/uktrade","html_url":"https://github.com/uktrade","followers_url":"https://api.github.com/users/uktrade/followers","following_url":"https://api.github.com/users/uktrade/following{/other_user}","gists_url":"https://api.github.com/users/uktrade/gists{/gist_id}","starred_url":"https://api.github.com/users/uktrade/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uktrade/subscriptions","organizations_url":"https://api.github.com/users/uktrade/orgs","repos_url":"https://api.github.com/users/uktrade/repos","events_url":"https://api.github.com/users/uktrade/events{/privacy}","received_events_url":"https://api.github.com/users/uktrade/received_events","type":"Organization","site_admin":false},"repo":{"id":73379434,"name":"data-hub-leeloo","full_name":"uktrade/data-hub-leeloo","owner":{"login":"uktrade","id":15107524,"avatar_url":"https://avatars2.githubusercontent.com/u/15107524?v=4","gravatar_id":"","url":"https://api.github.com/users/uktrade","html_url":"https://github.com/uktrade","followers_url":"https://api.github.com/users/uktrade/followers","following_url":"https://api.github.com/users/uktrade/following{/other_user}","gists_url":"https://api.github.com/users/uktrade/gists{/gist_id}","starred_url":"https://api.github.com/users/uktrade/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uktrade/subscriptions","organizations_url":"https://api.github.com/users/uktrade/orgs","repos_url":"https://api.github.com/users/uktrade/repos","events_url":"https://api.github.com/users/uktrade/events{/privacy}","received_events_url":"https://api.github.com/users/uktrade/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/uktrade/data-hub-leeloo","description":"Django API for Data Hub frontend","fork":false,"url":"https://api.github.com/repos/uktrade/data-hub-leeloo","forks_url":"https://api.github.com/repos/uktrade/data-hub-leeloo/forks","keys_url":"https://api.github.com/repos/uktrade/data-hub-leeloo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/uktrade/data-hub-leeloo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/uktrade/data-hub-leeloo/teams","hooks_url":"https://api.github.com/repos/uktrade/data-hub-leeloo/hooks","issue_events_url":"https://api.github.com/repos/uktrade/data-hub-leeloo/issues/events{/number}","events_url":"https://api.github.com/repos/uktrade/data-hub-leeloo/events","assignees_url":"https://api.github.com/repos/uktrade/data-hub-leeloo/assignees{/user}","branches_url":"https://api.github.com/repos/uktrade/data-hub-leeloo/branches{/branch}","tags_url":"https://api.github.com/repos/uktrade/data-hub-leeloo/tags","blobs_url":"https://api.github.com/repos/uktrade/data-hub-leeloo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/uktrade/data-hub-leeloo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/uktrade/data-hub-leeloo/git/refs{/sha}","trees_url":"https://api.github.com/repos/uktrade/data-hub-leeloo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/uktrade/data-hub-leeloo/statuses/{sha}","languages_url":"https://api.github.com/repos/uktrade/data-hub-leeloo/languages","stargazers_url":"https://api.github.com/repos/uktrade/data-hub-leeloo/stargazers","contributors_url":"https://api.github.com/repos/uktrade/data-hub-leeloo/contributors","subscribers_url":"https://api.github.com/repos/uktrade/data-hub-leeloo/subscribers","subscription_url":"https://api.github.com/repos/uktrade/data-hub-leeloo/subscription","commits_url":"https://api.github.com/repos/uktrade/data-hub-leeloo/commits{/sha}","git_commits_url":"https://api.github.com/repos/uktrade/data-hub-leeloo/git/commits{/sha}","comments_url":"https://api.github.com/repos/uktrade/data-hub-leeloo/comments{/number}","issue_comment_url":"https://api.github.com/repos/uktrade/data-hub-leeloo/issues/comments{/number}","contents_url":"https://api.github.com/repos/uktrade/data-hub-leeloo/contents/{+path}","compare_url":"https://api.github.com/repos/uktrade/data-hub-leeloo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/uktrade/data-hub-leeloo/merges","archive_url":"https://api.github.com/repos/uktrade/data-hub-leeloo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/uktrade/data-hub-leeloo/downloads","issues_url":"https://api.github.com/repos/uktrade/data-hub-leeloo/issues{/number}","pulls_url":"https://api.github.com/repos/uktrade/data-hub-leeloo/pulls{/number}","milestones_url":"https://api.github.com/repos/uktrade/data-hub-leeloo/milestones{/number}","notifications_url":"https://api.github.com/repos/uktrade/data-hub-leeloo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/uktrade/data-hub-leeloo/labels{/name}","releases_url":"https://api.github.com/repos/uktrade/data-hub-leeloo/releases{/id}","deployments_url":"https://api.github.com/repos/uktrade/data-hub-leeloo/deployments","created_at":"2016-11-10T12:21:01Z","updated_at":"2017-08-04T11:07:16Z","pushed_at":"2017-09-08T13:39:59Z","git_url":"git://github.com/uktrade/data-hub-leeloo.git","ssh_url":"git@github.com:uktrade/data-hub-leeloo.git","clone_url":"https://github.com/uktrade/data-hub-leeloo.git","svn_url":"https://github.com/uktrade/data-hub-leeloo","homepage":null,"size":3132,"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,"open_issues_count":8,"forks":0,"open_issues":8,"watchers":0,"default_branch":"develop"}},"base":{"label":"uktrade:develop","ref":"develop","sha":"6e8236d2376a2bc62fb739f65c2064225aa538d4","user":{"login":"uktrade","id":15107524,"avatar_url":"https://avatars2.githubusercontent.com/u/15107524?v=4","gravatar_id":"","url":"https://api.github.com/users/uktrade","html_url":"https://github.com/uktrade","followers_url":"https://api.github.com/users/uktrade/followers","following_url":"https://api.github.com/users/uktrade/following{/other_user}","gists_url":"https://api.github.com/users/uktrade/gists{/gist_id}","starred_url":"https://api.github.com/users/uktrade/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uktrade/subscriptions","organizations_url":"https://api.github.com/users/uktrade/orgs","repos_url":"https://api.github.com/users/uktrade/repos","events_url":"https://api.github.com/users/uktrade/events{/privacy}","received_events_url":"https://api.github.com/users/uktrade/received_events","type":"Organization","site_admin":false},"repo":{"id":73379434,"name":"data-hub-leeloo","full_name":"uktrade/data-hub-leeloo","owner":{"login":"uktrade","id":15107524,"avatar_url":"https://avatars2.githubusercontent.com/u/15107524?v=4","gravatar_id":"","url":"https://api.github.com/users/uktrade","html_url":"https://github.com/uktrade","followers_url":"https://api.github.com/users/uktrade/followers","following_url":"https://api.github.com/users/uktrade/following{/other_user}","gists_url":"https://api.github.com/users/uktrade/gists{/gist_id}","starred_url":"https://api.github.com/users/uktrade/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uktrade/subscriptions","organizations_url":"https://api.github.com/users/uktrade/orgs","repos_url":"https://api.github.com/users/uktrade/repos","events_url":"https://api.github.com/users/uktrade/events{/privacy}","received_events_url":"https://api.github.com/users/uktrade/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/uktrade/data-hub-leeloo","description":"Django API for Data Hub frontend","fork":false,"url":"https://api.github.com/repos/uktrade/data-hub-leeloo","forks_url":"https://api.github.com/repos/uktrade/data-hub-leeloo/forks","keys_url":"https://api.github.com/repos/uktrade/data-hub-leeloo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/uktrade/data-hub-leeloo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/uktrade/data-hub-leeloo/teams","hooks_url":"https://api.github.com/repos/uktrade/data-hub-leeloo/hooks","issue_events_url":"https://api.github.com/repos/uktrade/data-hub-leeloo/issues/events{/number}","events_url":"https://api.github.com/repos/uktrade/data-hub-leeloo/events","assignees_url":"https://api.github.com/repos/uktrade/data-hub-leeloo/assignees{/user}","branches_url":"https://api.github.com/repos/uktrade/data-hub-leeloo/branches{/branch}","tags_url":"https://api.github.com/repos/uktrade/data-hub-leeloo/tags","blobs_url":"https://api.github.com/repos/uktrade/data-hub-leeloo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/uktrade/data-hub-leeloo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/uktrade/data-hub-leeloo/git/refs{/sha}","trees_url":"https://api.github.com/repos/uktrade/data-hub-leeloo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/uktrade/data-hub-leeloo/statuses/{sha}","languages_url":"https://api.github.com/repos/uktrade/data-hub-leeloo/languages","stargazers_url":"https://api.github.com/repos/uktrade/data-hub-leeloo/stargazers","contributors_url":"https://api.github.com/repos/uktrade/data-hub-leeloo/contributors","subscribers_url":"https://api.github.com/repos/uktrade/data-hub-leeloo/subscribers","subscription_url":"https://api.github.com/repos/uktrade/data-hub-leeloo/subscription","commits_url":"https://api.github.com/repos/uktrade/data-hub-leeloo/commits{/sha}","git_commits_url":"https://api.github.com/repos/uktrade/data-hub-leeloo/git/commits{/sha}","comments_url":"https://api.github.com/repos/uktrade/data-hub-leeloo/comments{/number}","issue_comment_url":"https://api.github.com/repos/uktrade/data-hub-leeloo/issues/comments{/number}","contents_url":"https://api.github.com/repos/uktrade/data-hub-leeloo/contents/{+path}","compare_url":"https://api.github.com/repos/uktrade/data-hub-leeloo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/uktrade/data-hub-leeloo/merges","archive_url":"https://api.github.com/repos/uktrade/data-hub-leeloo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/uktrade/data-hub-leeloo/downloads","issues_url":"https://api.github.com/repos/uktrade/data-hub-leeloo/issues{/number}","pulls_url":"https://api.github.com/repos/uktrade/data-hub-leeloo/pulls{/number}","milestones_url":"https://api.github.com/repos/uktrade/data-hub-leeloo/milestones{/number}","notifications_url":"https://api.github.com/repos/uktrade/data-hub-leeloo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/uktrade/data-hub-leeloo/labels{/name}","releases_url":"https://api.github.com/repos/uktrade/data-hub-leeloo/releases{/id}","deployments_url":"https://api.github.com/repos/uktrade/data-hub-leeloo/deployments","created_at":"2016-11-10T12:21:01Z","updated_at":"2017-08-04T11:07:16Z","pushed_at":"2017-09-08T13:39:59Z","git_url":"git://github.com/uktrade/data-hub-leeloo.git","ssh_url":"git@github.com:uktrade/data-hub-leeloo.git","clone_url":"https://github.com/uktrade/data-hub-leeloo.git","svn_url":"https://github.com/uktrade/data-hub-leeloo","homepage":null,"size":3132,"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,"open_issues_count":8,"forks":0,"open_issues":8,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/uktrade/data-hub-leeloo/pulls/456"},"html":{"href":"https://github.com/uktrade/data-hub-leeloo/pull/456"},"issue":{"href":"https://api.github.com/repos/uktrade/data-hub-leeloo/issues/456"},"comments":{"href":"https://api.github.com/repos/uktrade/data-hub-leeloo/issues/456/comments"},"review_comments":{"href":"https://api.github.com/repos/uktrade/data-hub-leeloo/pulls/456/comments"},"review_comment":{"href":"https://api.github.com/repos/uktrade/data-hub-leeloo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/uktrade/data-hub-leeloo/pulls/456/commits"},"statuses":{"href":"https://api.github.com/repos/uktrade/data-hub-leeloo/statuses/d07cb0e65e1d7849b371dd28276206e7f262caf7"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"marcofucci"}}