Repository: praw-dev/praw

Issue:
WikiPage.revisions raises TypeError if an author of revision isn't exist
## Issue Description

As the title said. To reproduce:

```
$ cat rev_no_author.py
import praw

reddit = praw.Reddit('prawtest')
list(reddit.subreddit('theoryofreddit').wiki['index'].revisions())

$ python3 -mpdb rev_no_author.py
> /Users/foo/issues/rev_no_author.py(1)<module>()
-> import praw
(Pdb) c
Traceback (most recent call last):
...
  File "/usr/local/lib/python3.6/site-packages/praw/models/reddit/wikipage.py", line 16, in _revision_generator
    _data=revision['author']['data'])
TypeError: 'NoneType' object is not subscriptable
Uncaught exception. Entering post mortem debugging
Running 'cont' or 'step' will restart the program
> /usr/local/lib/python3.6/site-packages/praw/models/reddit/wikipage.py(16)_revision_generator()
-> _data=revision['author']['data'])
(Pdb) p revision
{'timestamp': 1357210312.0, 'reason': None, 'author': None, 'page': 'index', 'id': '873933a0-5550-11e2-82f1-12313b0c1e2b'}
```

And here is the [URL](https://www.reddit.com/r/TheoryOfReddit/wiki/index?v=873933a0-5550-11e2-82f1-12313b0c1e2b) whose ID is '873933a0-5550-11e2-82f1-12313b0c1e2b'.

## System Information

PRAW Version: 4.4.0
Python Version: 3.6.0
Operating System: El Capitan 10.11.6



Discussion:
Looks like the same occurs in line 63 of wikipage.py.

Resolving patch:
diff --git a/praw/models/reddit/wikipage.py b/praw/models/reddit/wikipage.py
--- a/praw/models/reddit/wikipage.py
+++ b/praw/models/reddit/wikipage.py
@@ -12,8 +12,9 @@ class WikiPage(RedditBase):
     def _revision_generator(subreddit, url, generator_kwargs):
         for revision in ListingGenerator(subreddit._reddit, url,
                                          **generator_kwargs):
-            revision['author'] = Redditor(subreddit._reddit,
-                                          _data=revision['author']['data'])
+            if revision['author'] is not None:
+                revision['author'] = Redditor(subreddit._reddit,
+                                              _data=revision['author']['data'])
             revision['page'] = WikiPage(subreddit._reddit, subreddit,
                                         revision['page'], revision['id'])
             yield revision
@@ -59,8 +60,9 @@ def __str__(self):
     def _fetch(self):
         params = {'v': self._revision} if self._revision else None
         data = self._reddit.get(self._info_path(), params=params)['data']
-        data['revision_by'] = Redditor(self._reddit,
-                                       _data=data['revision_by']['data'])
+        if data['revision_by'] is not None:
+            data['revision_by'] = Redditor(self._reddit,
+                                           _data=data['revision_by']['data'])
         self.__dict__.update(data)
         self._fetched = True
 


Test patch:
diff --git a/tests/integration/cassettes/TestWikiPage.test_init__with_revision__author_deleted.json b/tests/integration/cassettes/TestWikiPage.test_init__with_revision__author_deleted.json
new file mode 100644
--- /dev/null
+++ b/tests/integration/cassettes/TestWikiPage.test_init__with_revision__author_deleted.json
@@ -0,0 +1,110 @@
+{
+  "http_interactions": [
+    {
+      "recorded_at": "2017-03-10T20:22:10",
+      "request": {
+        "body": {
+          "encoding": "utf-8",
+          "string": "grant_type=client_credentials"
+        },
+        "headers": {
+          "Accept": "*/*",
+          "Accept-Encoding": "identity",
+          "Authorization": "Basic <BASIC_AUTH>",
+          "Connection": "keep-alive",
+          "Content-Length": "29",
+          "Content-Type": "application/x-www-form-urlencoded",
+          "User-Agent": "<USER_AGENT> PRAW/4.4.1.dev0 prawcore/0.8.0"
+        },
+        "method": "POST",
+        "uri": "https://www.reddit.com/api/v1/access_token"
+      },
+      "response": {
+        "body": {
+          "encoding": "UTF-8",
+          "string": "{\"access_token\": \"<ACCESS_TOKEN>\", \"token_type\": \"bearer\", \"expires_in\": 3600, \"scope\": \"*\"}"
+        },
+        "headers": {
+          "Accept-Ranges": "bytes",
+          "Connection": "keep-alive",
+          "Content-Length": "105",
+          "Content-Type": "application/json; charset=UTF-8",
+          "Date": "Fri, 10 Mar 2017 20:22:12 GMT",
+          "Server": "snooserv",
+          "Set-Cookie": "loid=9kwxRn2WWjIAIlNPKK; Domain=reddit.com; Max-Age=63071999; Path=/;  secure",
+          "Strict-Transport-Security": "max-age=15552000; includeSubDomains; preload",
+          "Via": "1.1 varnish",
+          "X-Cache": "MISS",
+          "X-Cache-Hits": "0",
+          "X-Moose": "majestic",
+          "X-Served-By": "cache-atl6240-ATL",
+          "X-Timer": "S1489177332.208043,VS0,VE40",
+          "cache-control": "max-age=0, must-revalidate",
+          "x-content-type-options": "nosniff",
+          "x-frame-options": "SAMEORIGIN",
+          "x-xss-protection": "1; mode=block"
+        },
+        "status": {
+          "code": 200,
+          "message": "OK"
+        },
+        "url": "https://www.reddit.com/api/v1/access_token"
+      }
+    },
+    {
+      "recorded_at": "2017-03-10T20:22:10",
+      "request": {
+        "body": {
+          "encoding": "utf-8",
+          "string": ""
+        },
+        "headers": {
+          "Accept": "*/*",
+          "Accept-Encoding": "identity",
+          "Authorization": "bearer <ACCESS_TOKEN>",
+          "Connection": "keep-alive",
+          "Cookie": "loid=9kwxRn2WWjIAIlNPKK; loidcreated=1489177332000",
+          "User-Agent": "<USER_AGENT> PRAW/4.4.1.dev0 prawcore/0.8.0"
+        },
+        "method": "GET",
+        "uri": "https://oauth.reddit.com/r/<TEST_SUBREDDIT>/wiki/index?raw_json=1&v=873933a0-5550-11e2-82f1-12313b0c1e2b"
+      },
+      "response": {
+        "body": {
+          "encoding": "UTF-8",
+          "string": "{\"kind\": \"wikipage\", \"data\": {\"may_revise\": false, \"revision_date\": 1357210312.0, \"content_html\": \"\\u003C!-- SC_OFF --\\u003E\\u003Cdiv class=\\\"md wiki\\\"\\u003E\\u003Cdiv class=\\\"toc\\\"\\u003E\\u003Cul\\u003E\\u003Cli class=\\\"wiki_<TEST_SUBREDDIT>_rules\\\"\\u003E\\u003Ca href=\\\"#wiki_<TEST_SUBREDDIT>_rules\\\"\\u003ETheoryOfReddit Rules\\u003C/a\\u003E\\u003C/li\\u003E\\u003Cli class=\\\"wiki_wiki_editing_protocol\\\"\\u003E\\u003Ca href=\\\"#wiki_wiki_editing_protocol\\\"\\u003EWiki editing protocol\\u003C/a\\u003E\\u003C/li\\u003E\\u003Cli class=\\\"wiki_quality_posts.2C_how_do_i_make_them.3F\\\"\\u003E\\u003Ca href=\\\"#wiki_quality_posts.2C_how_do_i_make_them.3F\\\"\\u003EQuality posts, how do I make them?\\u003C/a\\u003E\\u003C/li\\u003E\\u003Cli class=\\\"wiki_tor.2Freddit_glossary\\\"\\u003E\\u003Ca href=\\\"#wiki_tor.2Freddit_glossary\\\"\\u003EToR/Reddit Glossary\\u003C/a\\u003E\\u003C/li\\u003E\\u003Cli class=\\\"wiki_tor.2Freddit_faq\\\"\\u003E\\u003Ca href=\\\"#wiki_tor.2Freddit_faq\\\"\\u003EToR/Reddit FAQ\\u003C/a\\u003E\\u003C/li\\u003E\\u003Cli class=\\\"wiki_other_pages\\\"\\u003E\\u003Ca href=\\\"#wiki_other_pages\\\"\\u003EOther pages\\u003C/a\\u003E\\u003C/li\\u003E\\u003C/ul\\u003E\\u003C/div\\u003E\\u003Cp\\u003E\\u003Cimg src=\\\"//b.thumbs.redditmedia.com/lCnQ6AfUxbcldFes.png\\\" alt=\\\"TheoryOfReddit - Index\\\" /\\u003E\\u003C/p\\u003E\\n\\u003Ch2 id=\\\"wiki_<TEST_SUBREDDIT>_rules\\\"\\u003E\\u003Ca href=\\\"http://www.reddit.com/r/TheoryOfReddit/wiki/rules\\\" rel=\\\"nofollow\\\"\\u003ETheoryOfReddit Rules\\u003C/a\\u003E\\u003C/h2\\u003E\\n\\u003Cp\\u003EWhy was your comment deleted? What is a bannable offence? Please take a moment to read our \\u003Ca href=\\\"http://www.reddit.com/r/TheoryOfReddit/wiki/rules\\\" rel=\\\"nofollow\\\"\\u003Erules\\u003C/a\\u003E.\\u003C/p\\u003E\\n\\u003Ch2 id=\\\"wiki_wiki_editing_protocol\\\"\\u003E\\u003Ca href=\\\"http://www.reddit.com/r/TheoryOfReddit/wiki/wiki_protocol\\\" rel=\\\"nofollow\\\"\\u003EWiki editing protocol\\u003C/a\\u003E\\u003C/h2\\u003E\\n\\u003Cp\\u003EAny user with an account older than 90 days and who has accumulated at least 50 subreddit karma can edit the wiki. However editing the wiki does come with a few guidelines to keep things organized. That said, Wikipedia\\u0026#39;s \\u003Ca href=\\\"http://en.wikipedia.org/wiki/Wikipedia:Be_bold\\\" rel=\\\"nofollow\\\"\\u003EBe Bold\\u003C/a\\u003E still applies - all edits made in good faith are welcome, and it is easier to restructure existing content than to write something new.\\u003C/p\\u003E\\n\\u003Ch2 id=\\\"wiki_quality_posts.2C_how_do_i_make_them.3F\\\"\\u003E\\u003Ca href=\\\"http://www.reddit.com/r/TheoryOfReddit/wiki/submission_guide\\\" rel=\\\"nofollow\\\"\\u003EQuality posts, how do I make them?\\u003C/a\\u003E\\u003C/h2\\u003E\\n\\u003Cp\\u003EIn ToR we see a good amount of posts appear everyday, a good amount of those posts are of good quality. But we see also a lot of stillborns, posts that from the start had the odds against them and that either get removed by mods or never leave the catacombs of new. This of course how Reddit works, however we noticed that a decent amount of those posts do have relevant information in them, it is just poorly presented. And that is where this guide comes in, with this guide you can check if your post has a decent starting change when you decide to post to Reddit. It is no guarantee for success, but it will certainly give your post a healthy start. \\u003C/p\\u003E\\n\\u003Ch2 id=\\\"wiki_tor.2Freddit_glossary\\\"\\u003E\\u003Ca href=\\\"http://www.reddit.com/r/TheoryOfReddit/wiki/glossary\\\" rel=\\\"nofollow\\\"\\u003EToR/Reddit Glossary\\u003C/a\\u003E\\u003C/h2\\u003E\\n\\u003Cp\\u003EA glossary of terms often used on ToR, reddit or the internet in general. \\u003C/p\\u003E\\n\\u003Ch2 id=\\\"wiki_tor.2Freddit_faq\\\"\\u003E\\u003Ca href=\\\"http://www.reddit.com/r/TheoryOfReddit/wiki/faq\\\" rel=\\\"nofollow\\\"\\u003EToR/Reddit FAQ\\u003C/a\\u003E\\u003C/h2\\u003E\\n\\u003Cp\\u003EThis is not a complete article but a starting point for filling the wiki. \\u003C/p\\u003E\\n\\u003Ch2 id=\\\"wiki_other_pages\\\"\\u003E\\u003Ca href=\\\"http://www.reddit.com/r/TheoryOfReddit/wiki/pages/\\\" rel=\\\"nofollow\\\"\\u003EOther pages\\u003C/a\\u003E\\u003C/h2\\u003E\\n\\u003Cp\\u003EAll pages currently in the wiki\\u003C/p\\u003E\\n\\u003C/div\\u003E\\u003C!-- SC_ON --\\u003E\", \"revision_by\": null, \"content_md\": \"![TheoryOfReddit - Index](%%wiki%%)\\r\\n\\r\\n## [TheoryOfReddit Rules](http://www.reddit.com/r/TheoryOfReddit/wiki/rules)\\r\\nWhy was your comment deleted? What is a bannable offence? Please take a moment to read our [rules](http://www.reddit.com/r/TheoryOfReddit/wiki/rules).\\r\\n\\r\\n## [Wiki editing protocol](http://www.reddit.com/r/TheoryOfReddit/wiki/wiki_protocol)\\r\\nAny user with an account older than 90 days and who has accumulated at least 50 subreddit karma can edit the wiki. However editing the wiki does come with a few guidelines to keep things organized. That said, Wikipedia's [Be Bold](http://en.wikipedia.org/wiki/Wikipedia:Be_bold) still applies - all edits made in good faith are welcome, and it is easier to restructure existing content than to write something new.\\r\\n\\r\\n## [Quality posts, how do I make them?](http://www.reddit.com/r/TheoryOfReddit/wiki/submission_guide)\\r\\nIn ToR we see a good amount of posts appear everyday, a good amount of those posts are of good quality. But we see also a lot of stillborns, posts that from the start had the odds against them and that either get removed by mods or never leave the catacombs of new. This of course how Reddit works, however we noticed that a decent amount of those posts do have relevant information in them, it is just poorly presented. And that is where this guide comes in, with this guide you can check if your post has a decent starting change when you decide to post to Reddit. It is no guarantee for success, but it will certainly give your post a healthy start. \\r\\n\\r\\n## [ToR/Reddit Glossary](http://www.reddit.com/r/TheoryOfReddit/wiki/glossary)\\r\\nA glossary of terms often used on ToR, reddit or the internet in general. \\r\\n\\r\\n## [ToR/Reddit FAQ](http://www.reddit.com/r/TheoryOfReddit/wiki/faq)\\r\\nThis is not a complete article but a starting point for filling the wiki. \\r\\n\\r\\n## [Other pages](http://www.reddit.com/r/TheoryOfReddit/wiki/pages/) \\r\\nAll pages currently in the wiki\"}}"
+        },
+        "headers": {
+          "Accept-Ranges": "bytes",
+          "Connection": "keep-alive",
+          "Content-Length": "6155",
+          "Content-Type": "application/json; charset=UTF-8",
+          "Date": "Fri, 10 Mar 2017 20:22:12 GMT",
+          "Server": "snooserv",
+          "Strict-Transport-Security": "max-age=15552000; includeSubDomains; preload",
+          "Vary": "accept-encoding",
+          "Via": "1.1 varnish",
+          "X-Cache": "MISS",
+          "X-Cache-Hits": "0",
+          "X-Moose": "majestic",
+          "X-Served-By": "cache-atl6247-ATL",
+          "X-Timer": "S1489177332.475232,VS0,VE90",
+          "access-control-allow-origin": "*",
+          "access-control-expose-headers": "X-Reddit-Tracking, X-Moose",
+          "cache-control": "max-age=0, must-revalidate",
+          "x-content-type-options": "nosniff",
+          "x-frame-options": "SAMEORIGIN",
+          "x-reddit-tracking": "https://pixel.redditmedia.com/pixel/of_destiny.png?v=YkZJykfMz6MRcYSwtjRvb5GzZrIqUxOZtpScxcsfSgRCGOXiHEPM0GT1NdPG3QXNrYfCWClCFsDkEccACrtHZNz7h%2BbfByZy",
+          "x-ua-compatible": "IE=edge",
+          "x-xss-protection": "1; mode=block"
+        },
+        "status": {
+          "code": 200,
+          "message": "OK"
+        },
+        "url": "https://oauth.reddit.com/r/<TEST_SUBREDDIT>/wiki/index?raw_json=1&v=873933a0-5550-11e2-82f1-12313b0c1e2b"
+      }
+    }
+  ],
+  "recorded_with": "betamax/0.8.0"
+}
\ No newline at end of file
diff --git a/tests/integration/cassettes/TestWikiPage.test_revisions__author_deleted.json b/tests/integration/cassettes/TestWikiPage.test_revisions__author_deleted.json
new file mode 100644
--- /dev/null
+++ b/tests/integration/cassettes/TestWikiPage.test_revisions__author_deleted.json
@@ -0,0 +1,111 @@
+{
+  "http_interactions": [
+    {
+      "recorded_at": "2017-03-10T20:22:11",
+      "request": {
+        "body": {
+          "encoding": "utf-8",
+          "string": "grant_type=client_credentials"
+        },
+        "headers": {
+          "Accept": "*/*",
+          "Accept-Encoding": "identity",
+          "Authorization": "Basic <BASIC_AUTH>",
+          "Connection": "keep-alive",
+          "Content-Length": "29",
+          "Content-Type": "application/x-www-form-urlencoded",
+          "User-Agent": "<USER_AGENT> PRAW/4.4.1.dev0 prawcore/0.8.0"
+        },
+        "method": "POST",
+        "uri": "https://www.reddit.com/api/v1/access_token"
+      },
+      "response": {
+        "body": {
+          "encoding": "UTF-8",
+          "string": "{\"access_token\": \"<ACCESS_TOKEN>\", \"token_type\": \"bearer\", \"expires_in\": 3600, \"scope\": \"*\"}"
+        },
+        "headers": {
+          "Accept-Ranges": "bytes",
+          "Connection": "keep-alive",
+          "Content-Length": "105",
+          "Content-Type": "application/json; charset=UTF-8",
+          "Date": "Fri, 10 Mar 2017 20:22:12 GMT",
+          "Server": "snooserv",
+          "Set-Cookie": "loid=pBB0trIFjrXEbSvy92; Domain=reddit.com; Max-Age=63071999; Path=/;  secure",
+          "Strict-Transport-Security": "max-age=15552000; includeSubDomains; preload",
+          "Via": "1.1 varnish",
+          "X-Cache": "MISS",
+          "X-Cache-Hits": "0",
+          "X-Moose": "majestic",
+          "X-Served-By": "cache-atl6239-ATL",
+          "X-Timer": "S1489177332.936092,VS0,VE34",
+          "cache-control": "max-age=0, must-revalidate",
+          "x-content-type-options": "nosniff",
+          "x-frame-options": "SAMEORIGIN",
+          "x-xss-protection": "1; mode=block"
+        },
+        "status": {
+          "code": 200,
+          "message": "OK"
+        },
+        "url": "https://www.reddit.com/api/v1/access_token"
+      }
+    },
+    {
+      "recorded_at": "2017-03-10T20:22:11",
+      "request": {
+        "body": {
+          "encoding": "utf-8",
+          "string": ""
+        },
+        "headers": {
+          "Accept": "*/*",
+          "Accept-Encoding": "identity",
+          "Authorization": "bearer <ACCESS_TOKEN>",
+          "Connection": "keep-alive",
+          "Cookie": "loid=pBB0trIFjrXEbSvy92; loidcreated=1489177332000",
+          "User-Agent": "<USER_AGENT> PRAW/4.4.1.dev0 prawcore/0.8.0"
+        },
+        "method": "GET",
+        "uri": "https://oauth.reddit.com/r/<TEST_SUBREDDIT>/wiki/revisions/index?raw_json=1&limit=10"
+      },
+      "response": {
+        "body": {
+          "encoding": "UTF-8",
+          "string": "{\"kind\": \"Listing\", \"data\": {\"modhash\": \"\", \"children\": [{\"timestamp\": 1410669829.0, \"reason\": null, \"author\": {\"kind\": \"t2\", \"data\": {\"name\": \"kjoneslol\", \"is_friend\": false, \"created\": 1260869194.0, \"hide_from_robots\": true, \"created_utc\": 1260840394.0, \"link_karma\": 65478, \"comment_karma\": 31839, \"is_gold\": false, \"is_mod\": true, \"has_verified_email\": true, \"id\": \"3rtpv\"}}, \"page\": \"index\", \"id\": \"a9e563ba-3b86-11e4-ad8f-12313b0b1c29\"}, {\"timestamp\": 1365052093.0, \"reason\": null, \"author\": {\"kind\": \"t2\", \"data\": {\"name\": \"creesch\", \"is_friend\": false, \"created\": 1288850222.0, \"hide_from_robots\": false, \"created_utc\": 1288821422.0, \"link_karma\": 11709, \"comment_karma\": 35803, \"is_gold\": true, \"is_mod\": true, \"has_verified_email\": true, \"id\": \"4hmu0\"}}, \"page\": \"index\", \"id\": \"98b9b110-9ca2-11e2-b479-12313b0d4e76\"}, {\"timestamp\": 1362174794.0, \"reason\": null, \"author\": {\"kind\": \"t2\", \"data\": {\"name\": \"ManWithoutModem\", \"is_friend\": false, \"created\": 1266044825.0, \"hide_from_robots\": true, \"created_utc\": 1266016025.0, \"link_karma\": 34167, \"comment_karma\": 137224, \"is_gold\": true, \"is_mod\": true, \"has_verified_email\": true, \"id\": \"3vshb\"}}, \"page\": \"index\", \"id\": \"5cee9a64-8277-11e2-8848-12313b0cc078\"}, {\"timestamp\": 1357210312.0, \"reason\": null, \"author\": null, \"page\": \"index\", \"id\": \"873933a0-5550-11e2-82f1-12313b0c1e2b\"}, {\"timestamp\": 1357210262.0, \"reason\": \"Be bold!\", \"author\": null, \"page\": \"index\", \"id\": \"692c9910-5550-11e2-8c63-12313b0e5c97\"}, {\"timestamp\": 1357183193.0, \"reason\": null, \"author\": {\"kind\": \"t2\", \"data\": {\"name\": \"creesch\", \"is_friend\": false, \"created\": 1288850222.0, \"hide_from_robots\": false, \"created_utc\": 1288821422.0, \"link_karma\": 11709, \"comment_karma\": 35803, \"is_gold\": true, \"is_mod\": true, \"has_verified_email\": true, \"id\": \"4hmu0\"}}, \"page\": \"index\", \"id\": \"62f2cb80-5511-11e2-9ac3-12313b0e688e\"}, {\"timestamp\": 1357171951.0, \"reason\": null, \"author\": {\"kind\": \"t2\", \"data\": {\"name\": \"creesch\", \"is_friend\": false, \"created\": 1288850222.0, \"hide_from_robots\": false, \"created_utc\": 1288821422.0, \"link_karma\": 11709, \"comment_karma\": 35803, \"is_gold\": true, \"is_mod\": true, \"has_verified_email\": true, \"id\": \"4hmu0\"}}, \"page\": \"index\", \"id\": \"35e13c36-54f7-11e2-b5ce-12313b0c1e2b\"}, {\"timestamp\": 1356770258.0, \"reason\": null, \"author\": {\"kind\": \"t2\", \"data\": {\"name\": \"creesch\", \"is_friend\": false, \"created\": 1288850222.0, \"hide_from_robots\": false, \"created_utc\": 1288821422.0, \"link_karma\": 11709, \"comment_karma\": 35803, \"is_gold\": true, \"is_mod\": true, \"has_verified_email\": true, \"id\": \"4hmu0\"}}, \"page\": \"index\", \"id\": \"f2580b52-514f-11e2-975d-12313d285567\"}, {\"timestamp\": 1356755876.0, \"reason\": null, \"author\": {\"kind\": \"t2\", \"data\": {\"name\": \"creesch\", \"is_friend\": false, \"created\": 1288850222.0, \"hide_from_robots\": false, \"created_utc\": 1288821422.0, \"link_karma\": 11709, \"comment_karma\": 35803, \"is_gold\": true, \"is_mod\": true, \"has_verified_email\": true, \"id\": \"4hmu0\"}}, \"page\": \"index\", \"id\": \"75cb6fbe-512e-11e2-9b01-12313b08d131\"}, {\"timestamp\": 1356755781.0, \"reason\": null, \"author\": {\"kind\": \"t2\", \"data\": {\"name\": \"creesch\", \"is_friend\": false, \"created\": 1288850222.0, \"hide_from_robots\": false, \"created_utc\": 1288821422.0, \"link_karma\": 11709, \"comment_karma\": 35803, \"is_gold\": true, \"is_mod\": true, \"has_verified_email\": true, \"id\": \"4hmu0\"}}, \"page\": \"index\", \"id\": \"3d97f4a0-512e-11e2-a43d-12313d16a9f2\"}], \"after\": \"WikiRevision_3d97f4a0-512e-11e2-a43d-12313d16a9f2\", \"before\": null}}"
+        },
+        "headers": {
+          "Accept-Ranges": "bytes",
+          "Connection": "keep-alive",
+          "Content-Length": "3480",
+          "Content-Type": "application/json; charset=UTF-8",
+          "Date": "Fri, 10 Mar 2017 20:22:13 GMT",
+          "Server": "snooserv",
+          "Strict-Transport-Security": "max-age=15552000; includeSubDomains; preload",
+          "Vary": "accept-encoding",
+          "Via": "1.1 varnish",
+          "X-Cache": "MISS",
+          "X-Cache-Hits": "0",
+          "X-Moose": "majestic",
+          "X-Served-By": "cache-atl6248-ATL",
+          "X-Timer": "S1489177333.174814,VS0,VE78",
+          "access-control-allow-origin": "*",
+          "access-control-expose-headers": "X-Reddit-Tracking, X-Moose",
+          "cache-control": "max-age=0, must-revalidate",
+          "x-content-type-options": "nosniff",
+          "x-frame-options": "SAMEORIGIN",
+          "x-reddit-tracking": "https://pixel.redditmedia.com/pixel/of_destiny.png?v=C9X2ZrQojXObPoAIiK1bNzZ1%2FdvnCeKlfrGLtXxNyAql8O25azV%2F%2Boctx7V5nG0xEG9te3yg0evO8y2yPrrSJ%2FyE9KujaSPF",
+          "x-robots-tag": "noindex, nofollow",
+          "x-ua-compatible": "IE=edge",
+          "x-xss-protection": "1; mode=block"
+        },
+        "status": {
+          "code": 200,
+          "message": "OK"
+        },
+        "url": "https://oauth.reddit.com/r/<TEST_SUBREDDIT>/wiki/revisions/index?raw_json=1&limit=10"
+      }
+    }
+  ],
+  "recorded_with": "betamax/0.8.0"
+}
\ No newline at end of file
diff --git a/tests/integration/models/reddit/test_wikipage.py b/tests/integration/models/reddit/test_wikipage.py
--- a/tests/integration/models/reddit/test_wikipage.py
+++ b/tests/integration/models/reddit/test_wikipage.py
@@ -43,6 +43,15 @@ def test_init__with_revision(self):
             assert isinstance(page.revision_by, Redditor)
             assert page.revision_date == 1367295177
 
+    def test_init__with_revision__author_deleted(self):
+        subreddit = self.reddit.subreddit(
+            pytest.placeholders.test_subreddit)
+        page = WikiPage(self.reddit, subreddit, 'index',
+                        revision='873933a0-5550-11e2-82f1-12313b0c1e2b')
+        with self.recorder.use_cassette(
+                'TestWikiPage.test_init__with_revision__author_deleted'):
+            assert page.revision_by is None
+
     def test_invalid_page(self):
         subreddit = self.reddit.subreddit(
             pytest.placeholders.test_subreddit)
@@ -72,6 +81,16 @@ def test_revisions(self, _):
                 assert isinstance(revision['page'], WikiPage)
             assert count > 0
 
+    @mock.patch('time.sleep', return_value=None)
+    def test_revisions__author_deleted(self, _):
+        subreddit = self.reddit.subreddit(
+            pytest.placeholders.test_subreddit)
+
+        with self.recorder.use_cassette(
+                'TestWikiPage.test_revisions__author_deleted'):
+            revisions = subreddit.wiki['index'].revisions(limit=10)
+            assert any(revision['author'] is None for revision in revisions)
+
 
 class TestWikiPageModeration(IntegrationTest):
     def test_add(self):