Skip to content

Commit

Permalink
Update SubredditTest.
Browse files Browse the repository at this point in the history
  • Loading branch information
bboe committed Apr 14, 2015
1 parent 4b56977 commit a71dd55
Show file tree
Hide file tree
Showing 17 changed files with 101 additions and 85 deletions.
1 change: 1 addition & 0 deletions tests/cassettes/test_attribute_error.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"http_interactions": [{"request": {"body": {"string": "passwd=1111&user=PyAPITestUser2&api_type=json", "encoding": "utf-8"}, "headers": {"Content-Length": ["45"], "Accept-Encoding": ["gzip, deflate"], "Accept": ["*/*"], "User-Agent": ["PRAW_test_suite PRAW/3.0a1 Python/2.6.8 Darwin-13.4.0-x86_64-i386-64bit"], "Connection": ["keep-alive"], "Content-Type": ["application/x-www-form-urlencoded"]}, "method": "POST", "uri": "https://api.reddit.com/api/login/.json"}, "response": {"body": {"base64_string": "H4sIAAAAAAAAAxzLTYrDMAxA4asYrV2wLTuWfY7uylDkSiGdn7gkKdOh5O5Du30f7wmfa5+hmifosvRlhWpOH9aA8MbvPKvKedq224tG/l7VGvjpMvE6QTXwwPn+97sI3VvhkDyxRpaIcmmcNeGYRaMv4xDawI5a8mANXHr/uurrz+gCDdkG59PBxYOPR0cVc0VnlUeORMI+RpRQtGhCzalhcMS+FE2+CRHs+/4PAAD//wMAR8n9s8oAAAA=", "encoding": "UTF-8"}, "headers": {"x-xss-protection": ["1; mode=block"], "x-content-type-options": ["nosniff"], "content-encoding": ["gzip"], "transfer-encoding": ["chunked"], "set-cookie": ["__cfduid=d933086635594e1d44db2f722406762551429025850; expires=Wed, 13-Apr-16 15:37:30 GMT; path=/; domain=.reddit.com; HttpOnly, secure_session=; Domain=reddit.com; Max-Age=-1429025850; Path=/; expires=Thu, 01-Jan-1970 00:00:01 GMT; HttpOnly, reddit_session=7302867%2C2015-04-14T08%3A37%3A30%2Ceafa488da1443d29e9e53e75b3208a199e51bd88; Domain=reddit.com; Path=/; HttpOnly"], "server": ["cloudflare-nginx"], "connection": ["keep-alive"], "x-ua-compatible": ["IE=edge"], "pragma": ["no-cache"], "cache-control": ["no-cache, no-cache"], "date": ["Tue, 14 Apr 2015 15:37:30 GMT"], "x-frame-options": ["SAMEORIGIN"], "x-moose": ["majestic"], "content-type": ["application/json; charset=UTF-8"], "cf-ray": ["1d707e0aa8250d91-SJC"]}, "cookies": [{"comment": null, "domain": ".reddit.com", "name": "__cfduid", "expires": 1460561850, "value": "d933086635594e1d44db2f722406762551429025850", "version": 0, "rfc2109": false, "discard": false, "path": "/", "rest": {"HttpOnly": null}, "port": null, "comment_url": null, "secure": false}, {"comment": null, "domain": ".reddit.com", "name": "reddit_session", "expires": null, "value": "7302867%2C2015-04-14T08%3A37%3A30%2Ceafa488da1443d29e9e53e75b3208a199e51bd88", "version": 0, "rfc2109": false, "discard": true, "path": "/", "rest": {"HttpOnly": null}, "port": null, "comment_url": null, "secure": false}], "status": {"message": "OK", "code": 200}, "url": "https://api.reddit.com/api/login/.json"}, "recorded_at": "2015-04-14T15:37:29"}, {"request": {"body": {"string": "", "encoding": "utf-8"}, "headers": {"Connection": ["keep-alive"], "Cookie": ["reddit_session=7302867%2C2015-04-14T08%3A37%3A30%2Ceafa488da1443d29e9e53e75b3208a199e51bd88; __cfduid=d933086635594e1d44db2f722406762551429025850"], "Accept-Encoding": ["gzip, deflate"], "Accept": ["*/*"], "User-Agent": ["PRAW_test_suite PRAW/3.0a1 Python/2.6.8 Darwin-13.4.0-x86_64-i386-64bit"]}, "method": "GET", "uri": "https://api.reddit.com/r/reddit_api_test/about/.json"}, "response": {"body": {"base64_string": "H4sIADs0LVUC/3VSy27bMBD8FUPnVLIdKHFzS3JweyjQIKeiKIgVubLY8KGSS9dOkH8vSUuxoqAXAdpdzszOzkvxJI0obhYF1cXFohBAEP9eigaMQcek3qVmavnQaEmM8ECsI61i3QSlYif4NOlZfpPAWlAeY0Nm5DXV9mqGMIIK6XsFR2ZAY6o5FCKOQC/jmKc00iGIs5KOqL+pqqakLujGl6cHGoWEkltdid/7H/Z287A73NL27vv9l8fN/d/j3R/76fNWPDzuD8/fum3rKFx9LXuzyxrQcyd7ktbMFiNJKstqrW3ApWFulYLeIxOokFCwSKrRkJ+sbffoVptJoQ+Nkpz9n0jyWPLyOZFNSxP7BxtGScPUBHJ2JyXNE1PQ4IQGOLchamXASe4TTH1WRw7aVvKJ7IFy0PXzcrm8WMTPrxNJIm7QpcXXqzNvzseMdwyIthEPyLrYIhcSx3h4qtlbTrhDoByk1eV6XdfL6+u6XCYcl0CLylWznFTZISmQgZheYkBigdJeM7Qh4u9tH6VG9ynuF96J/XjH0fQhBcxz65BlJVqaJCUxRWsGwXTs87onpLdzeZ8yMTbBHFNnlHL2etzs9fUfyRo/hbgDAAA=", "encoding": "UTF-8"}, "headers": {"content-length": ["464"], "x-xss-protection": ["1; mode=block"], "x-reddit-tracking": ["https://pixel.redditmedia.com/pixel/of_destiny.png?v=e2yrQC8Zqs6IdSZcZ%2FAkhTEVaPdRZPF%2FeR0T5Lux9NETIbcXU7bucb4Xh8a4dw8z5%2BnmzxW1qrfvJcxyWcsBsgn3GCfrQug%2F"], "x-content-type-options": ["nosniff"], "content-encoding": ["gzip"], "vary": ["accept-encoding"], "x-ratelimit-remaining": ["297"], "server": ["cloudflare-nginx"], "connection": ["keep-alive"], "x-ua-compatible": ["IE=edge"], "pragma": ["no-cache"], "cache-control": ["no-cache, no-cache"], "date": ["Tue, 14 Apr 2015 15:37:31 GMT"], "x-frame-options": ["SAMEORIGIN"], "x-moose": ["majestic"], "content-type": ["application/json; charset=UTF-8"], "cf-ray": ["1d707e1048580d91-SJC"], "x-ratelimit-used": ["3"], "x-ratelimit-reset": ["150"]}, "status": {"message": "OK", "code": 200}, "url": "https://api.reddit.com/r/reddit_api_test/about/.json"}, "recorded_at": "2015-04-14T15:37:29"}], "recorded_with": "betamax/0.4.1"}
1 change: 1 addition & 0 deletions tests/cassettes/test_display_name_lazy_update.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"http_interactions": [{"request": {"body": {"string": "passwd=1111&user=PyAPITestUser2&api_type=json", "encoding": "utf-8"}, "headers": {"Content-Length": ["45"], "Accept-Encoding": ["gzip, deflate"], "Accept": ["*/*"], "User-Agent": ["PRAW_test_suite PRAW/3.0a1 Python/2.7.5 Darwin-13.4.0-x86_64-i386-64bit"], "Connection": ["keep-alive"], "Content-Type": ["application/x-www-form-urlencoded"]}, "method": "POST", "uri": "https://api.reddit.com/api/login/.json"}, "response": {"body": {"base64_string": "H4sIAAAAAAAAAxzLS27DMAwA0asIXCsAaZOSonN0VxSFZFJxvmpt7wLfPUi28zBPuKz9Adk9wZalLytk9/3jHWjZyic/zPR33ra/N7VyW807uHedyzpDdnC+RTvFC4d/4cqCRNaGiZWYKiEH1taMY6pRC1U9BgLvYOr9erb3H0ccUoh+QJID8oH4C2MWySi+iGJDkanoWIO1ZEOs45impmJsJTU9EoUG+76/AAAA//8DAOYnksbKAAAA", "encoding": "UTF-8"}, "headers": {"x-xss-protection": ["1; mode=block"], "x-content-type-options": ["nosniff"], "content-encoding": ["gzip"], "transfer-encoding": ["chunked"], "set-cookie": ["__cfduid=d4be630366f391a801a6d2c5339e73d451429023305; expires=Wed, 13-Apr-16 14:55:05 GMT; path=/; domain=.reddit.com; HttpOnly, secure_session=; Domain=reddit.com; Max-Age=-1429023305; Path=/; expires=Thu, 01-Jan-1970 00:00:01 GMT; HttpOnly, reddit_session=7302867%2C2015-04-14T07%3A55%3A05%2Ca5d0f055cad3b6ef8e27b338cfd5e4ea8fd9116f; Domain=reddit.com; Path=/; HttpOnly"], "server": ["cloudflare-nginx"], "connection": ["keep-alive"], "x-ua-compatible": ["IE=edge"], "pragma": ["no-cache"], "cache-control": ["no-cache, no-cache"], "date": ["Tue, 14 Apr 2015 14:55:05 GMT"], "x-frame-options": ["SAMEORIGIN"], "x-moose": ["majestic"], "content-type": ["application/json; charset=UTF-8"], "cf-ray": ["1d703fe93a9e11a1-SJC"]}, "cookies": [{"comment": null, "domain": ".reddit.com", "name": "__cfduid", "expires": 1460559305, "value": "d4be630366f391a801a6d2c5339e73d451429023305", "version": 0, "rfc2109": false, "discard": false, "path": "/", "rest": {"HttpOnly": null}, "port": null, "comment_url": null, "secure": false}, {"comment": null, "domain": ".reddit.com", "name": "reddit_session", "expires": null, "value": "7302867%2C2015-04-14T07%3A55%3A05%2Ca5d0f055cad3b6ef8e27b338cfd5e4ea8fd9116f", "version": 0, "rfc2109": false, "discard": true, "path": "/", "rest": {"HttpOnly": null}, "port": null, "comment_url": null, "secure": false}], "status": {"message": "OK", "code": 200}, "url": "https://api.reddit.com/api/login/.json"}, "recorded_at": "2015-04-14T14:55:06"}, {"request": {"body": {"string": "", "encoding": "utf-8"}, "headers": {"Connection": ["keep-alive"], "Cookie": ["reddit_session=7302867%2C2015-04-14T07%3A55%3A05%2Ca5d0f055cad3b6ef8e27b338cfd5e4ea8fd9116f; __cfduid=d4be630366f391a801a6d2c5339e73d451429023305"], "Accept-Encoding": ["gzip, deflate"], "Accept": ["*/*"], "User-Agent": ["PRAW_test_suite PRAW/3.0a1 Python/2.7.5 Darwin-13.4.0-x86_64-i386-64bit"]}, "method": "GET", "uri": "https://api.reddit.com/r/REDDIT_API_TEST/about/.json"}, "response": {"body": {"base64_string": "H4sIAEoqLVUC/3VSTU/jMBD9K1XOkJSglC434NDlsNIiTqvVynLsSePFH8Eed1sQ/309aUJDEJdImRm/9+bNe82elJXZ9SLDKjtbZJIjT3+vWc2tBc+U2VKTWiHWRiFD2CNr0ehUt1Hr1ImBJgPr3xBYw3WA1FA9comVW80QRlCpQqf5gVlugGoepEwjvFNpLCCNtMDlSUmL2F0XRZ1jG00d8uMDA1LxXDhTyL+7X+5m/bDd3+Dm9ufd98f13b/D7bM7/7aRD4+7/cuPdtN4jKv7vLPbXgME4VWHytnZYqhQ97Ia52ruaVg4rXkXgEnQgCBZIjVgMUzWdjvwF+tJoYu1VoJ9TaREKgX1QmTT0sT+wYZR0jA1gZzdSSv7xDSvYULDhXAxaWVcoNoRzOqkDj1vGiUmsgfKQdfvy+XybJE+f44kRFyDp8XL8sTb52PGOwbEuITH0fnUQh+JYzw8Vuw9J8IDxz5IF5dlWVXLq6sqXxKOJ9Cs8MUsJ0XvkJLAuJxeYkBiEWmvGdoQ8Y+2j1KT+5j2ix/Efr7jaPqQAhaE88B6JUZZkkJMyZpBMB66ft0j0vu5QqBMjE1uD9QZpZy8HpS8vf0HfXGYAbcDAAA=", "encoding": "UTF-8"}, "headers": {"content-length": ["464"], "x-xss-protection": ["1; mode=block"], "x-reddit-tracking": ["https://pixel.redditmedia.com/pixel/of_destiny.png?v=m1aKXIplNYTFXblSCtb8kJXi3aHt6jt424746GKdJTR5omkIYiPrJUMWm8WXI1hylYcihMCYi2a2xl9QVuUZnDSHf45op2pY"], "x-content-type-options": ["nosniff"], "content-encoding": ["gzip"], "vary": ["accept-encoding"], "x-ratelimit-remaining": ["299"], "server": ["cloudflare-nginx"], "connection": ["keep-alive"], "x-ua-compatible": ["IE=edge"], "pragma": ["no-cache"], "cache-control": ["no-cache, no-cache"], "date": ["Tue, 14 Apr 2015 14:55:06 GMT"], "x-frame-options": ["SAMEORIGIN"], "x-moose": ["majestic"], "content-type": ["application/json; charset=UTF-8"], "cf-ray": ["1d703fef6ac311a1-SJC"], "x-ratelimit-used": ["1"], "x-ratelimit-reset": ["294"]}, "status": {"message": "OK", "code": 200}, "url": "https://api.reddit.com/r/REDDIT_API_TEST/about/.json"}, "recorded_at": "2015-04-14T14:55:06"}], "recorded_with": "betamax/0.4.1"}
1 change: 1 addition & 0 deletions tests/cassettes/test_display_name_refresh.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"http_interactions": [{"request": {"body": {"string": "passwd=1111&user=PyAPITestUser2&api_type=json", "encoding": "utf-8"}, "headers": {"Content-Length": ["45"], "Accept-Encoding": ["gzip, deflate"], "Accept": ["*/*"], "User-Agent": ["PRAW_test_suite PRAW/3.0a1 Python/2.7.5 Darwin-13.4.0-x86_64-i386-64bit"], "Connection": ["keep-alive"], "Content-Type": ["application/x-www-form-urlencoded"]}, "method": "POST", "uri": "https://api.reddit.com/api/login/.json"}, "response": {"body": {"base64_string": "H4sIAAAAAAAAAxyNy26EMAwAfyXyOSs5LxvyHb1Vq5UhdmlpNxVwW/HvFb3OaDQv+Nr7E6p7gW5b33ao7v3uHTQ55B8/VdtjOY7fS5l87+od/PS2yL5AdfCBuqa0DnMOTQoh46Q65Bg5liEl0cTEowSbtZHkTAbewdz7+qlXzwnjQOwjhnLDfAv5DbmWUpG9pRkNQ2NKoVnIohjJZLwGZNPYEk2hWITzPP8AAAD//wMAap4XvcoAAAA=", "encoding": "UTF-8"}, "headers": {"x-xss-protection": ["1; mode=block"], "x-content-type-options": ["nosniff"], "content-encoding": ["gzip"], "transfer-encoding": ["chunked"], "set-cookie": ["__cfduid=d9d6c35951d1b165a2c82d61f55054ac81429023306; expires=Wed, 13-Apr-16 14:55:06 GMT; path=/; domain=.reddit.com; HttpOnly, secure_session=; Domain=reddit.com; Max-Age=-1429023307; Path=/; expires=Thu, 01-Jan-1970 00:00:01 GMT; HttpOnly, reddit_session=7302867%2C2015-04-14T07%3A55%3A07%2Cf3c0f01d7631df14ae026fa9ee846fb9d36b15f2; Domain=reddit.com; Path=/; HttpOnly"], "server": ["cloudflare-nginx"], "connection": ["keep-alive"], "x-ua-compatible": ["IE=edge"], "pragma": ["no-cache"], "cache-control": ["no-cache, no-cache"], "date": ["Tue, 14 Apr 2015 14:55:07 GMT"], "x-frame-options": ["SAMEORIGIN"], "x-moose": ["majestic"], "content-type": ["application/json; charset=UTF-8"], "cf-ray": ["1d703ff3f18d0651-SJC"]}, "cookies": [{"comment": null, "domain": ".reddit.com", "name": "__cfduid", "expires": 1460559306, "value": "d9d6c35951d1b165a2c82d61f55054ac81429023306", "version": 0, "rfc2109": false, "discard": false, "path": "/", "rest": {"HttpOnly": null}, "port": null, "comment_url": null, "secure": false}, {"comment": null, "domain": ".reddit.com", "name": "reddit_session", "expires": null, "value": "7302867%2C2015-04-14T07%3A55%3A07%2Cf3c0f01d7631df14ae026fa9ee846fb9d36b15f2", "version": 0, "rfc2109": false, "discard": true, "path": "/", "rest": {"HttpOnly": null}, "port": null, "comment_url": null, "secure": false}], "status": {"message": "OK", "code": 200}, "url": "https://api.reddit.com/api/login/.json"}, "recorded_at": "2015-04-14T14:55:08"}, {"request": {"body": {"string": "", "encoding": "utf-8"}, "headers": {"Connection": ["keep-alive"], "Cookie": ["reddit_session=7302867%2C2015-04-14T07%3A55%3A07%2Cf3c0f01d7631df14ae026fa9ee846fb9d36b15f2; __cfduid=d9d6c35951d1b165a2c82d61f55054ac81429023306"], "Accept-Encoding": ["gzip, deflate"], "Accept": ["*/*"], "User-Agent": ["PRAW_test_suite PRAW/3.0a1 Python/2.7.5 Darwin-13.4.0-x86_64-i386-64bit"]}, "method": "GET", "uri": "https://api.reddit.com/r/REDDIT_API_TEST/about/.json"}, "response": {"body": {"base64_string": "H4sIAEwqLVUC/3VSTU/jMBD9K1XOkJSglC434NDlsNIiTqvVynLsSePFH8Eed1sQ/309aUJDEJdImRm/9+bNe82elJXZ9SLDKjtbZJIjT3+vWc2tBc+U2VKTWiHWRiFD2CNr0ehUt1Hr1ImBJgPr3xBYw3WA1FA9comVW80QRlCpQqf5gVlugGoepEwjvFNpLCCNtMDlSUmL2F0XRZ1jG00d8uMDA1LxXDhTyL+7X+5m/bDd3+Dm9ufd98f13b/D7bM7/7aRD4+7/cuPdtN4jKv7vLPbXgME4VWHytnZYqhQ97Ia52ruaVg4rXkXgEnQgCBZIjVgMUzWdjvwF+tJoYu1VoJ9TaREKgX1QmTT0sT+wYZR0jA1gZzdSSv7xDSvYULDhXAxaWVcoNoRzOqkDj1vGiUmsgfKQdfvy+XybJE+f44kRFyDp8XL8sTb52PGOwbEuITH0fnUQh+JYzw8Vuw9J8IDxz5IF5dlWVXLq6sqXxKOJ9Cs8MUsJ0XvkJLAuJxeYkBiEWmvGdoQ8Y+2j1KT+5j2ix/Efr7jaPqQAhaE88B6JUZZkkJMyZpBMB66ft0j0vu5QqBMjE1uD9QZpZy8HpS8vf0HfXGYAbcDAAA=", "encoding": "UTF-8"}, "headers": {"content-length": ["464"], "x-xss-protection": ["1; mode=block"], "x-reddit-tracking": ["https://pixel.redditmedia.com/pixel/of_destiny.png?v=leVwtGr1ympM4uN9GMrfi%2FmiGBjMA63wW3HGcEZ5TbPURCYbD37ceZcrKzuh4C62nud7vKUQHCWIcdj0rAFvc5fvIeYDmxvX"], "x-content-type-options": ["nosniff"], "content-encoding": ["gzip"], "vary": ["accept-encoding"], "x-ratelimit-remaining": ["298"], "server": ["cloudflare-nginx"], "connection": ["keep-alive"], "x-ua-compatible": ["IE=edge"], "pragma": ["no-cache"], "cache-control": ["no-cache, no-cache"], "date": ["Tue, 14 Apr 2015 14:55:08 GMT"], "x-frame-options": ["SAMEORIGIN"], "x-moose": ["majestic"], "content-type": ["application/json; charset=UTF-8"], "cf-ray": ["1d703ffaf1af0651-SJC"], "x-ratelimit-used": ["2"], "x-ratelimit-reset": ["292"]}, "status": {"message": "OK", "code": 200}, "url": "https://api.reddit.com/r/REDDIT_API_TEST/about/.json"}, "recorded_at": "2015-04-14T14:55:08"}], "recorded_with": "betamax/0.4.1"}

0 comments on commit a71dd55

Please sign in to comment.