Skip to content

Commit

Permalink
Update test_message.py
Browse files Browse the repository at this point in the history
  • Loading branch information
bboe committed Apr 15, 2015
1 parent e55d879 commit 77ce280
Show file tree
Hide file tree
Showing 13 changed files with 118 additions and 92 deletions.
1 change: 1 addition & 0 deletions tests/cassettes/test_get_message.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": "H4sIAAAAAAAAAxzLTWrDMBBA4auIWSsgzWiksc7RXSlFtsa4+VOxlZQQfPeQbt/He8Jxa1fI5gm6rm3dIJvPL2ugll7+81W1fi+9/75pLudNrYFLq0vZFsgGqPfbgn98f+CMUVySVAMm1cqJxsSDUCgpDn5ijsgSFKyBqbXTj77/RA4lJovO88GFgw8fSJk4h2CFsc5CxOijDF5rdDq6kaYJqyMpGGPQIh72fX8BAAD//wMAvh6bDsoAAAA=", "encoding": "UTF-8"}, "headers": {"x-xss-protection": ["1; mode=block"], "x-content-type-options": ["nosniff"], "content-encoding": ["gzip"], "transfer-encoding": ["chunked"], "set-cookie": ["__cfduid=d6e709a1220c701c454ecb3abda29754e1429079743; expires=Thu, 14-Apr-16 06:35:43 GMT; path=/; domain=.reddit.com; HttpOnly, secure_session=; Domain=reddit.com; Max-Age=-1429079744; Path=/; expires=Thu, 01-Jan-1970 00:00:01 GMT; HttpOnly, reddit_session=7302867%2C2015-04-14T23%3A35%3A44%2C852df8335216891ed60eb0b3cc2d038a2664ea81; 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": ["Wed, 15 Apr 2015 06:35:44 GMT"], "x-frame-options": ["SAMEORIGIN"], "x-moose": ["majestic"], "content-type": ["application/json; charset=UTF-8"], "cf-ray": ["1d75a1c9cd0a012a-SJC"]}, "cookies": [{"comment": null, "domain": ".reddit.com", "name": "__cfduid", "expires": 1460615743, "value": "d6e709a1220c701c454ecb3abda29754e1429079743", "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-14T23%3A35%3A44%2C852df8335216891ed60eb0b3cc2d038a2664ea81", "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-15T06:35:44"}, {"request": {"body": {"string": "", "encoding": "utf-8"}, "headers": {"Connection": ["keep-alive"], "Cookie": ["reddit_session=7302867%2C2015-04-14T23%3A35%3A44%2C852df8335216891ed60eb0b3cc2d038a2664ea81; __cfduid=d6e709a1220c701c454ecb3abda29754e1429079743"], "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/message/inbox/.json?limit=1"}, "response": {"body": {"base64_string": "H4sIAAAAAAAAA2ySS4/TMBDHv4rxYU8NuInzaFYcENJKSDxWgj3RVeTHuDEkTrGdlqrqd19NNoEt4uZ5/WbmPz7Tn9ZpWhP60YZo3Y6uCNUiClqTM+0H3YrQYlh7p9yu7eHEhGYsT5VkhRQbUyhpdMYNlxuepWWqckjLtWEZklRrO+3B0Zp8P/9pFflVFznoE7o/QQhiB0QNLoKLmHMUoVFD36NZEyO6ACtCjfUhNv1zOq2JG7tuRagTPVo08ibbHI8HjYSr3GZOmQuUBxEBR1rztMpzxnP2muFoELAfvT+9u//wDUJ8COBTxIkxtoP/f2zGNWNUC5IX1YzEJZs29h3W3nTx9lWSkK/vmy93dyRJbnbxFp3aHojqRAhvt7TXW7r49/j4Rx/0v5kCWze9tT0s+Qv888zG8cIoPWhtcbNZgL3w4GJjUYJFE4T/nrbHIg/7zkJYzCmT/lXXwfHFXfTzFxptaCdVZ2QY5Q9QE/LB2V8jkPkcNUnLdcmAlYnJiizhiutEVhue6LRi0qRQmErRy+URlTcRJuGvzivBDH456eXyBAAA//8DAH14uOPPAgAA", "encoding": "UTF-8"}, "headers": {"x-ratelimit-remaining": ["299"], "x-xss-protection": ["1; mode=block"], "x-reddit-tracking": ["https://pixel.redditmedia.com/pixel/of_destiny.png?v=rzyQDtPtTvPw7fsca8QmDLl0E98pa79jO%2F7k2igMoV7OsSDSUXBuF%2F1XjssOJgrjfHJ3R%2BQHriqLR6vtYMHz%2B0We2VteKooJ"], "x-content-type-options": ["nosniff"], "content-encoding": ["gzip"], "transfer-encoding": ["chunked"], "server": ["cloudflare-nginx"], "connection": ["keep-alive"], "x-ua-compatible": ["IE=edge"], "pragma": ["no-cache"], "cache-control": ["no-cache, no-cache"], "date": ["Wed, 15 Apr 2015 06:35:46 GMT"], "x-frame-options": ["SAMEORIGIN"], "x-moose": ["majestic"], "content-type": ["application/json; charset=UTF-8"], "cf-ray": ["1d75a1d63d2e012a-SJC"], "x-ratelimit-used": ["1"], "x-ratelimit-reset": ["255"]}, "status": {"message": "OK", "code": 200}, "url": "https://api.reddit.com/message/inbox/.json?limit=1"}, "recorded_at": "2015-04-15T06:35:46"}, {"request": {"body": {"string": "", "encoding": "utf-8"}, "headers": {"Connection": ["keep-alive"], "Cookie": ["reddit_session=7302867%2C2015-04-14T23%3A35%3A44%2C852df8335216891ed60eb0b3cc2d038a2664ea81; __cfduid=d6e709a1220c701c454ecb3abda29754e1429079743"], "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/message/messages/39wwvd/.json"}, "response": {"body": {"base64_string": "H4sIAAAAAAAAA2ySyW7bMBCGX4XhISerpSVqsYIeigIBCnQJ0OYUFwKXkcVEolySshMYfvdiFCppit442zcz//BEH4zVtCb0i/HB2B1dEapFELQmJzqMuhO+w3B5L0G5xwcoGKsyzdK8lZLxnMtCgS4Fqypo841OS5GlawWFRpLqTK8dWFqTu9NLq8DfdJGjfkL3V/Be7ICo0QawAXOOwjdqHAY0a9KK3sOK0NY4H5rhOZ3WxE59vyLUigEtGniTbY7HwzzBm9wmpsQC5UAEwJHWPK3ynPGcvWM4GnjsR2+ePt58/gk+3HpwKeLEFLrR/T8Wcc0U1ILkRRWRuGTThaHH2ss+XF0kCfnxqfl+fU2S5HIXrtCpzYGoXnj/YUsHvaWLf4+Pf/RB//s5sLXzW5vDkr/Av0U2jucn6UBrg5tFAfbCgQ2NQQkWTRD+OG+PRQ72vQG/mHMmfVXXwvGvu+jnLzQZ382qRqSf5D2oGXlrze8JSDxHTdJyXTJgZdJmRZZwxXUiqw1PdFox2aZQtJWi5/MvVL4NgMJHqIR2dMstz+c/AAAA//8DAClYL9PIAgAA", "encoding": "UTF-8"}, "headers": {"x-ratelimit-remaining": ["298"], "x-xss-protection": ["1; mode=block"], "x-reddit-tracking": ["https://pixel.redditmedia.com/pixel/of_destiny.png?v=kQkNJpQLJonuQ%2B8wf5vNbju%2FaOaTRvfo5Nd2xPe8rWgnobbw9lD5mlpSOfMLpEMHO1p3s0Q2WTpj8I6lUEpFvBXR5sNz%2Fzk0"], "x-content-type-options": ["nosniff"], "content-encoding": ["gzip"], "transfer-encoding": ["chunked"], "server": ["cloudflare-nginx"], "connection": ["keep-alive"], "x-ua-compatible": ["IE=edge"], "pragma": ["no-cache"], "cache-control": ["no-cache, no-cache"], "date": ["Wed, 15 Apr 2015 06:35:47 GMT"], "x-frame-options": ["SAMEORIGIN"], "x-moose": ["majestic"], "content-type": ["application/json; charset=UTF-8"], "cf-ray": ["1d75a1dfdd3c012a-SJC"], "x-ratelimit-used": ["2"], "x-ratelimit-reset": ["254"]}, "status": {"message": "OK", "code": 200}, "url": "https://api.reddit.com/message/messages/39wwvd/.json"}, "recorded_at": "2015-04-15T06:35:47"}], "recorded_with": "betamax/0.4.1"}
1 change: 1 addition & 0 deletions tests/cassettes/test_get_unread_update_has_mail.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": "H4sIAAAAAAAAAxzLTWoDMQxA4asYrR0Y23Lk+BzZlVJkS2Ly63Zm6CbM3Uu6fR/vBdd1PKG6F+iyjGWF6j4+vQPhjf/zU1W+5m37fpPxfVXv4DFk5nWG6uD3pzS64YNHM0tChTsLdUztWAjNolGfVLI0CqU3MwXvoI9xu+j7pzTFciQfp5APEx4CnmOqKVcsnpSRzXKMqj1moWBIpYUiCWMQyxn1hNxg3/c/AAAA//8DAOpudyLKAAAA", "encoding": "UTF-8"}, "headers": {"x-xss-protection": ["1; mode=block"], "x-content-type-options": ["nosniff"], "content-encoding": ["gzip"], "transfer-encoding": ["chunked"], "set-cookie": ["__cfduid=d1c8e1e2185f43e3049ea391dbd236a201429079747; expires=Thu, 14-Apr-16 06:35:47 GMT; path=/; domain=.reddit.com; HttpOnly, secure_session=; Domain=reddit.com; Max-Age=-1429079748; Path=/; expires=Thu, 01-Jan-1970 00:00:01 GMT; HttpOnly, reddit_session=7302867%2C2015-04-14T23%3A35%3A48%2C7ea4aff522eec25d71f478b18d3421df554e94ab; 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": ["Wed, 15 Apr 2015 06:35:48 GMT"], "x-frame-options": ["SAMEORIGIN"], "x-moose": ["majestic"], "content-type": ["application/json; charset=UTF-8"], "cf-ray": ["1d75a1e467e50296-SJC"]}, "cookies": [{"comment": null, "domain": ".reddit.com", "name": "__cfduid", "expires": 1460615747, "value": "d1c8e1e2185f43e3049ea391dbd236a201429079747", "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-14T23%3A35%3A48%2C7ea4aff522eec25d71f478b18d3421df554e94ab", "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-15T06:35:48"}, {"request": {"body": {"string": "uh=vq8b7k4maobff3d78acad7c43b6874ff2f7c0ed5db718cbffe&text=body&api_type=json&to=PyAPITestUser3&subject=Update+has+mail", "encoding": "utf-8"}, "headers": {"Content-Length": ["119"], "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"], "Cookie": ["reddit_session=7302867%2C2015-04-14T23%3A35%3A48%2C7ea4aff522eec25d71f478b18d3421df554e94ab; __cfduid=d1c8e1e2185f43e3049ea391dbd236a201429079747"], "Content-Type": ["application/x-www-form-urlencoded"]}, "method": "POST", "uri": "https://api.reddit.com/api/compose/.json"}, "response": {"body": {"string": "{\"json\": {\"errors\": []}}", "encoding": "UTF-8"}, "headers": {"content-length": ["24"], "x-xss-protection": ["1; mode=block"], "x-content-type-options": ["nosniff"], "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": ["Wed, 15 Apr 2015 06:35:49 GMT"], "x-frame-options": ["SAMEORIGIN"], "x-moose": ["majestic"], "content-type": ["application/json; charset=UTF-8"], "cf-ray": ["1d75a1ef28700296-SJC"], "x-ratelimit-used": ["3"], "x-ratelimit-reset": ["251"]}, "status": {"message": "OK", "code": 200}, "url": "https://api.reddit.com/api/compose/.json"}, "recorded_at": "2015-04-15T06:35:49"}, {"request": {"body": {"string": "passwd=1111&uh=vq8b7k4maobff3d78acad7c43b6874ff2f7c0ed5db718cbffe&user=PyAPITestUser3&api_type=json", "encoding": "utf-8"}, "headers": {"Content-Length": ["99"], "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": "H4sIAAAAAAAAAxzLSW7DMAxA0asIXCuAqImhzpFdURS0ScHNpMJ2V4HvXqTb//BfcN3GE5p7ga3rWDdo7uPTO1DZ5T8/zfRr2fefN3W5b+YdPIYusi3QHFCiX5TIGI1TOEeZKFTV2KmyVKwFS1cjClMQrnlKBt7BPMbt294/hppDIPQxYDmFfMJ8iaml0kr2mNPMpNwpKlfthJZJUzKU0o3lnInnjhWO4/gDAAD//wMArlyBl8sAAAA=", "encoding": "UTF-8"}, "headers": {"x-xss-protection": ["1; mode=block"], "x-content-type-options": ["nosniff"], "content-encoding": ["gzip"], "transfer-encoding": ["chunked"], "set-cookie": ["__cfduid=da861b75d7475f1edd02fe666a527a0051429079749; expires=Thu, 14-Apr-16 06:35:49 GMT; path=/; domain=.reddit.com; HttpOnly, secure_session=; Domain=reddit.com; Max-Age=-1429079754; Path=/; expires=Thu, 01-Jan-1970 00:00:01 GMT; HttpOnly, reddit_session=10640071%2C2015-04-14T23%3A35%3A54%2C143c97d9f72d96df71e47d33e1a5fe9a8479cf16; 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": ["Wed, 15 Apr 2015 06:35:54 GMT"], "x-frame-options": ["SAMEORIGIN"], "x-moose": ["majestic"], "content-type": ["application/json; charset=UTF-8"], "cf-ray": ["1d75a1f2f88c0296-SJC"]}, "cookies": [{"comment": null, "domain": ".reddit.com", "name": "__cfduid", "expires": 1460615749, "value": "da861b75d7475f1edd02fe666a527a0051429079749", "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": "10640071%2C2015-04-14T23%3A35%3A54%2C143c97d9f72d96df71e47d33e1a5fe9a8479cf16", "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-15T06:35:55"}, {"request": {"body": {"string": "", "encoding": "utf-8"}, "headers": {"Connection": ["keep-alive"], "Cookie": ["reddit_session=10640071%2C2015-04-14T23%3A35%3A54%2C143c97d9f72d96df71e47d33e1a5fe9a8479cf16; __cfduid=da861b75d7475f1edd02fe666a527a0051429079749"], "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/user/PyAPITestUser3/about/.json"}, "response": {"body": {"base64_string": "H4sIAAAAAAAAA2yRwW7DIBBEfwVxjirAcRP7lmNvObRntIZ1vImBCnDkKsq/V1hJ5Ui9Ps0sM8ONX8hb3jKeFd8wbiEDb9mND5C0Axp5y3KccMO4B4dFePw5HD8+MeWvhLEqJkq6j4TLnR7GVNQmImQsRFZK1bVq6upNbBgfyKLuY3A6hi7ktPKcwmi1iWgtLbzIXbADpKE83Dk4W789KWpM0+xMtwUl+r0QvTAoto2suhrA7pWwOyFraaCEewTRUzb/hCktg302fQYZyV/0BaIrW8hyJDiHPv+x4g1XjFruVzZKulR4JS6swVIR52+KkCl43jI/jeMjyRUj9YRW4+vytHzQu5HzeZnbd2HWJkw+85Ypcb//AgAA//8DAP4BoSvGAQAA", "encoding": "UTF-8"}, "headers": {"x-ratelimit-remaining": ["296"], "x-xss-protection": ["1; mode=block"], "x-reddit-tracking": ["https://pixel.redditmedia.com/pixel/of_destiny.png?v=Zpqwv9U8OTCJ9HtVIjve2IIxaZMjXa%2FjJAweMgVTwDQFIQn%2Bd%2FfshmtaUjcPaFjjWB28giszR87zi2aGdcBRXUvvMxLgfqYz"], "x-content-type-options": ["nosniff"], "content-encoding": ["gzip"], "transfer-encoding": ["chunked"], "server": ["cloudflare-nginx"], "connection": ["keep-alive"], "x-ua-compatible": ["IE=edge"], "pragma": ["no-cache"], "cache-control": ["no-cache, no-cache"], "date": ["Wed, 15 Apr 2015 06:35:55 GMT"], "x-frame-options": ["SAMEORIGIN"], "x-moose": ["majestic"], "content-type": ["application/json; charset=UTF-8"], "cf-ray": ["1d75a21599620296-SJC"], "x-ratelimit-used": ["4"], "x-ratelimit-reset": ["245"]}, "status": {"message": "OK", "code": 200}, "url": "https://api.reddit.com/user/PyAPITestUser3/about/.json"}, "recorded_at": "2015-04-15T06:35:55"}], "recorded_with": "betamax/0.4.1"}

0 comments on commit 77ce280

Please sign in to comment.