{"action":"created","comment":{"url":"https://api.github.com/repos/koterpillar/aloe_django/pulls/comments/36711091","id":36711091,"diff_hunk":"@@ -93,6 +98,47 @@ def mail_sent_content_multiline(self):\n     return mail_sent_content(self, self.multiline, 'body')\n \n \n+@step(CHECK_PREFIX +\n+      r'I have sent an email with the following HTML alternative:')\n+def mail_sent_contains_html(self):\n+    \"\"\"\n+    Test that an email contains the HTML (assert HTML in) in the multiline as\n+    one of its MIME alternatives.\n+\n+    The HTML is normalised by passing through Django's\n+    :func:`django.test.html.parse_html`.\n+\n+    Example:\n+\n+    .. code-block:: gherkin\n+\n+        And I have sent an email with the following HTML alternative:\n+        \\\"\\\"\\\"\n+        <p><strong>Name:</strong> Sir Panda</p>\n+        <p><strong>Phone:</strong> 0400000000</p>\n+        <p><strong>Email:</strong> sir.panda@pand.as</p>\n+        \\\"\\\"\\\"\n+    \"\"\"\n+\n+    for email in mail.outbox:\n+        try:\n+            html = next(content for content, mime in email.alternatives\n+                        if mime == 'text/html')\n+            dom1 = parse_html(html)\n+            dom2 = parse_html(self.multiline)\n+\n+            assert_in(dom1, dom2)","path":"aloe_django/steps/mail.py","position":74,"original_position":74,"commit_id":"90737e5fa8dd2f62528fb2413cb31c4deed131a1","original_commit_id":"90737e5fa8dd2f62528fb2413cb31c4deed131a1","user":{"login":"danni","id":129472,"avatar_url":"https://avatars.githubusercontent.com/u/129472?v=3","gravatar_id":"","url":"https://api.github.com/users/danni","html_url":"https://github.com/danni","followers_url":"https://api.github.com/users/danni/followers","following_url":"https://api.github.com/users/danni/following{/other_user}","gists_url":"https://api.github.com/users/danni/gists{/gist_id}","starred_url":"https://api.github.com/users/danni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danni/subscriptions","organizations_url":"https://api.github.com/users/danni/orgs","repos_url":"https://api.github.com/users/danni/repos","events_url":"https://api.github.com/users/danni/events{/privacy}","received_events_url":"https://api.github.com/users/danni/received_events","type":"User","site_admin":false},"body":"inside. That's what I checked and updated the rest of the docs for.","created_at":"2015-08-11T04:34:31Z","updated_at":"2015-08-11T04:34:31Z","html_url":"https://github.com/koterpillar/aloe_django/pull/11#discussion_r36711091","pull_request_url":"https://api.github.com/repos/koterpillar/aloe_django/pulls/11","_links":{"self":{"href":"https://api.github.com/repos/koterpillar/aloe_django/pulls/comments/36711091"},"html":{"href":"https://github.com/koterpillar/aloe_django/pull/11#discussion_r36711091"},"pull_request":{"href":"https://api.github.com/repos/koterpillar/aloe_django/pulls/11"}}},"pull_request":{"url":"https://api.github.com/repos/koterpillar/aloe_django/pulls/11","id":42090161,"html_url":"https://github.com/koterpillar/aloe_django/pull/11","diff_url":"https://github.com/koterpillar/aloe_django/pull/11.diff","patch_url":"https://github.com/koterpillar/aloe_django/pull/11.patch","issue_url":"https://api.github.com/repos/koterpillar/aloe_django/issues/11","number":11,"state":"open","locked":false,"title":"Test HTML email","user":{"login":"danni","id":129472,"avatar_url":"https://avatars.githubusercontent.com/u/129472?v=3","gravatar_id":"","url":"https://api.github.com/users/danni","html_url":"https://github.com/danni","followers_url":"https://api.github.com/users/danni/followers","following_url":"https://api.github.com/users/danni/following{/other_user}","gists_url":"https://api.github.com/users/danni/gists{/gist_id}","starred_url":"https://api.github.com/users/danni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danni/subscriptions","organizations_url":"https://api.github.com/users/danni/orgs","repos_url":"https://api.github.com/users/danni/repos","events_url":"https://api.github.com/users/danni/events{/privacy}","received_events_url":"https://api.github.com/users/danni/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-08-11T03:46:09Z","updated_at":"2015-08-11T04:34:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"05ebcdbc16f6b6738d7cdc2fdfca1d9479af6b0f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/koterpillar/aloe_django/pulls/11/commits","review_comments_url":"https://api.github.com/repos/koterpillar/aloe_django/pulls/11/comments","review_comment_url":"https://api.github.com/repos/koterpillar/aloe_django/pulls/comments{/number}","comments_url":"https://api.github.com/repos/koterpillar/aloe_django/issues/11/comments","statuses_url":"https://api.github.com/repos/koterpillar/aloe_django/statuses/90737e5fa8dd2f62528fb2413cb31c4deed131a1","head":{"label":"infoxchange:more-mail-steps","ref":"more-mail-steps","sha":"90737e5fa8dd2f62528fb2413cb31c4deed131a1","user":{"login":"infoxchange","id":436479,"avatar_url":"https://avatars.githubusercontent.com/u/436479?v=3","gravatar_id":"","url":"https://api.github.com/users/infoxchange","html_url":"https://github.com/infoxchange","followers_url":"https://api.github.com/users/infoxchange/followers","following_url":"https://api.github.com/users/infoxchange/following{/other_user}","gists_url":"https://api.github.com/users/infoxchange/gists{/gist_id}","starred_url":"https://api.github.com/users/infoxchange/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/infoxchange/subscriptions","organizations_url":"https://api.github.com/users/infoxchange/orgs","repos_url":"https://api.github.com/users/infoxchange/repos","events_url":"https://api.github.com/users/infoxchange/events{/privacy}","received_events_url":"https://api.github.com/users/infoxchange/received_events","type":"Organization","site_admin":false},"repo":{"id":40155456,"name":"aloe_django","full_name":"infoxchange/aloe_django","owner":{"login":"infoxchange","id":436479,"avatar_url":"https://avatars.githubusercontent.com/u/436479?v=3","gravatar_id":"","url":"https://api.github.com/users/infoxchange","html_url":"https://github.com/infoxchange","followers_url":"https://api.github.com/users/infoxchange/followers","following_url":"https://api.github.com/users/infoxchange/following{/other_user}","gists_url":"https://api.github.com/users/infoxchange/gists{/gist_id}","starred_url":"https://api.github.com/users/infoxchange/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/infoxchange/subscriptions","organizations_url":"https://api.github.com/users/infoxchange/orgs","repos_url":"https://api.github.com/users/infoxchange/repos","events_url":"https://api.github.com/users/infoxchange/events{/privacy}","received_events_url":"https://api.github.com/users/infoxchange/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/infoxchange/aloe_django","description":"","fork":true,"url":"https://api.github.com/repos/infoxchange/aloe_django","forks_url":"https://api.github.com/repos/infoxchange/aloe_django/forks","keys_url":"https://api.github.com/repos/infoxchange/aloe_django/keys{/key_id}","collaborators_url":"https://api.github.com/repos/infoxchange/aloe_django/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/infoxchange/aloe_django/teams","hooks_url":"https://api.github.com/repos/infoxchange/aloe_django/hooks","issue_events_url":"https://api.github.com/repos/infoxchange/aloe_django/issues/events{/number}","events_url":"https://api.github.com/repos/infoxchange/aloe_django/events","assignees_url":"https://api.github.com/repos/infoxchange/aloe_django/assignees{/user}","branches_url":"https://api.github.com/repos/infoxchange/aloe_django/branches{/branch}","tags_url":"https://api.github.com/repos/infoxchange/aloe_django/tags","blobs_url":"https://api.github.com/repos/infoxchange/aloe_django/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/infoxchange/aloe_django/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/infoxchange/aloe_django/git/refs{/sha}","trees_url":"https://api.github.com/repos/infoxchange/aloe_django/git/trees{/sha}","statuses_url":"https://api.github.com/repos/infoxchange/aloe_django/statuses/{sha}","languages_url":"https://api.github.com/repos/infoxchange/aloe_django/languages","stargazers_url":"https://api.github.com/repos/infoxchange/aloe_django/stargazers","contributors_url":"https://api.github.com/repos/infoxchange/aloe_django/contributors","subscribers_url":"https://api.github.com/repos/infoxchange/aloe_django/subscribers","subscription_url":"https://api.github.com/repos/infoxchange/aloe_django/subscription","commits_url":"https://api.github.com/repos/infoxchange/aloe_django/commits{/sha}","git_commits_url":"https://api.github.com/repos/infoxchange/aloe_django/git/commits{/sha}","comments_url":"https://api.github.com/repos/infoxchange/aloe_django/comments{/number}","issue_comment_url":"https://api.github.com/repos/infoxchange/aloe_django/issues/comments{/number}","contents_url":"https://api.github.com/repos/infoxchange/aloe_django/contents/{+path}","compare_url":"https://api.github.com/repos/infoxchange/aloe_django/compare/{base}...{head}","merges_url":"https://api.github.com/repos/infoxchange/aloe_django/merges","archive_url":"https://api.github.com/repos/infoxchange/aloe_django/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/infoxchange/aloe_django/downloads","issues_url":"https://api.github.com/repos/infoxchange/aloe_django/issues{/number}","pulls_url":"https://api.github.com/repos/infoxchange/aloe_django/pulls{/number}","milestones_url":"https://api.github.com/repos/infoxchange/aloe_django/milestones{/number}","notifications_url":"https://api.github.com/repos/infoxchange/aloe_django/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/infoxchange/aloe_django/labels{/name}","releases_url":"https://api.github.com/repos/infoxchange/aloe_django/releases{/id}","created_at":"2015-08-04T00:58:01Z","updated_at":"2015-08-04T00:58:02Z","pushed_at":"2015-08-11T03:59:00Z","git_url":"git://github.com/infoxchange/aloe_django.git","ssh_url":"git@github.com:infoxchange/aloe_django.git","clone_url":"https://github.com/infoxchange/aloe_django.git","svn_url":"https://github.com/infoxchange/aloe_django","homepage":null,"size":15041,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"koterpillar:master","ref":"master","sha":"b95b2d5093d2e464a5b6db35b2686a49fd8c0893","user":{"login":"koterpillar","id":140276,"avatar_url":"https://avatars.githubusercontent.com/u/140276?v=3","gravatar_id":"","url":"https://api.github.com/users/koterpillar","html_url":"https://github.com/koterpillar","followers_url":"https://api.github.com/users/koterpillar/followers","following_url":"https://api.github.com/users/koterpillar/following{/other_user}","gists_url":"https://api.github.com/users/koterpillar/gists{/gist_id}","starred_url":"https://api.github.com/users/koterpillar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/koterpillar/subscriptions","organizations_url":"https://api.github.com/users/koterpillar/orgs","repos_url":"https://api.github.com/users/koterpillar/repos","events_url":"https://api.github.com/users/koterpillar/events{/privacy}","received_events_url":"https://api.github.com/users/koterpillar/received_events","type":"User","site_admin":false},"repo":{"id":34290082,"name":"aloe_django","full_name":"koterpillar/aloe_django","owner":{"login":"koterpillar","id":140276,"avatar_url":"https://avatars.githubusercontent.com/u/140276?v=3","gravatar_id":"","url":"https://api.github.com/users/koterpillar","html_url":"https://github.com/koterpillar","followers_url":"https://api.github.com/users/koterpillar/followers","following_url":"https://api.github.com/users/koterpillar/following{/other_user}","gists_url":"https://api.github.com/users/koterpillar/gists{/gist_id}","starred_url":"https://api.github.com/users/koterpillar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/koterpillar/subscriptions","organizations_url":"https://api.github.com/users/koterpillar/orgs","repos_url":"https://api.github.com/users/koterpillar/repos","events_url":"https://api.github.com/users/koterpillar/events{/privacy}","received_events_url":"https://api.github.com/users/koterpillar/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/koterpillar/aloe_django","description":"","fork":false,"url":"https://api.github.com/repos/koterpillar/aloe_django","forks_url":"https://api.github.com/repos/koterpillar/aloe_django/forks","keys_url":"https://api.github.com/repos/koterpillar/aloe_django/keys{/key_id}","collaborators_url":"https://api.github.com/repos/koterpillar/aloe_django/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/koterpillar/aloe_django/teams","hooks_url":"https://api.github.com/repos/koterpillar/aloe_django/hooks","issue_events_url":"https://api.github.com/repos/koterpillar/aloe_django/issues/events{/number}","events_url":"https://api.github.com/repos/koterpillar/aloe_django/events","assignees_url":"https://api.github.com/repos/koterpillar/aloe_django/assignees{/user}","branches_url":"https://api.github.com/repos/koterpillar/aloe_django/branches{/branch}","tags_url":"https://api.github.com/repos/koterpillar/aloe_django/tags","blobs_url":"https://api.github.com/repos/koterpillar/aloe_django/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/koterpillar/aloe_django/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/koterpillar/aloe_django/git/refs{/sha}","trees_url":"https://api.github.com/repos/koterpillar/aloe_django/git/trees{/sha}","statuses_url":"https://api.github.com/repos/koterpillar/aloe_django/statuses/{sha}","languages_url":"https://api.github.com/repos/koterpillar/aloe_django/languages","stargazers_url":"https://api.github.com/repos/koterpillar/aloe_django/stargazers","contributors_url":"https://api.github.com/repos/koterpillar/aloe_django/contributors","subscribers_url":"https://api.github.com/repos/koterpillar/aloe_django/subscribers","subscription_url":"https://api.github.com/repos/koterpillar/aloe_django/subscription","commits_url":"https://api.github.com/repos/koterpillar/aloe_django/commits{/sha}","git_commits_url":"https://api.github.com/repos/koterpillar/aloe_django/git/commits{/sha}","comments_url":"https://api.github.com/repos/koterpillar/aloe_django/comments{/number}","issue_comment_url":"https://api.github.com/repos/koterpillar/aloe_django/issues/comments{/number}","contents_url":"https://api.github.com/repos/koterpillar/aloe_django/contents/{+path}","compare_url":"https://api.github.com/repos/koterpillar/aloe_django/compare/{base}...{head}","merges_url":"https://api.github.com/repos/koterpillar/aloe_django/merges","archive_url":"https://api.github.com/repos/koterpillar/aloe_django/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/koterpillar/aloe_django/downloads","issues_url":"https://api.github.com/repos/koterpillar/aloe_django/issues{/number}","pulls_url":"https://api.github.com/repos/koterpillar/aloe_django/pulls{/number}","milestones_url":"https://api.github.com/repos/koterpillar/aloe_django/milestones{/number}","notifications_url":"https://api.github.com/repos/koterpillar/aloe_django/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/koterpillar/aloe_django/labels{/name}","releases_url":"https://api.github.com/repos/koterpillar/aloe_django/releases{/id}","created_at":"2015-04-20T22:32:10Z","updated_at":"2015-06-02T05:18:01Z","pushed_at":"2015-08-11T03:59:00Z","git_url":"git://github.com/koterpillar/aloe_django.git","ssh_url":"git@github.com:koterpillar/aloe_django.git","clone_url":"https://github.com/koterpillar/aloe_django.git","svn_url":"https://github.com/koterpillar/aloe_django","homepage":null,"size":15244,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/koterpillar/aloe_django/pulls/11"},"html":{"href":"https://github.com/koterpillar/aloe_django/pull/11"},"issue":{"href":"https://api.github.com/repos/koterpillar/aloe_django/issues/11"},"comments":{"href":"https://api.github.com/repos/koterpillar/aloe_django/issues/11/comments"},"review_comments":{"href":"https://api.github.com/repos/koterpillar/aloe_django/pulls/11/comments"},"review_comment":{"href":"https://api.github.com/repos/koterpillar/aloe_django/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/koterpillar/aloe_django/pulls/11/commits"},"statuses":{"href":"https://api.github.com/repos/koterpillar/aloe_django/statuses/90737e5fa8dd2f62528fb2413cb31c4deed131a1"}}}}