From 0ed5a08139021ab65a3857b913aaa66610a6c829 Mon Sep 17 00:00:00 2001 From: Harmon Date: Thu, 11 Feb 2021 21:35:03 -0600 Subject: [PATCH] Update cassettes for tests using API.create_friendship --- cassettes/testcreatedestroyblock.json | 269 --------------------- cassettes/testcreatedestroyblock.yaml | 254 +++++++++++++++++++ cassettes/testcreatedestroyfriendship.json | 181 -------------- cassettes/testcreatedestroyfriendship.yaml | 171 +++++++++++++ tests/test_api.py | 4 +- 5 files changed, 427 insertions(+), 452 deletions(-) delete mode 100644 cassettes/testcreatedestroyblock.json create mode 100644 cassettes/testcreatedestroyblock.yaml delete mode 100644 cassettes/testcreatedestroyfriendship.json create mode 100644 cassettes/testcreatedestroyfriendship.yaml diff --git a/cassettes/testcreatedestroyblock.json b/cassettes/testcreatedestroyblock.json deleted file mode 100644 index 9a93b8d..0000000 --- a/cassettes/testcreatedestroyblock.json +++ /dev/null @@ -1,269 +0,0 @@ -{ - "version": 1, - "interactions": [ - { - "request": { - "method": "POST", - "uri": "https://api.twitter.com/1.1/blocks/create.json?id=twitter", - "body": null, - "headers": { - "Host": [ - "api.twitter.com" - ], - "Content-Length": [ - "0" - ] - } - }, - "response": { - "status": { - "code": 200, - "message": "OK" - }, - "headers": { - "content-type": [ - "application/json;charset=utf-8" - ], - "x-xss-protection": [ - "1; mode=block; report=https://twitter.com/i/xss_report" - ], - "x-content-type-options": [ - "nosniff" - ], - "expires": [ - "Tue, 31 Mar 1981 05:00:00 GMT" - ], - "last-modified": [ - "Sat, 13 Jul 2019 02:27:36 GMT" - ], - "server": [ - "tsa_b" - ], - "cache-control": [ - "no-cache, no-store, must-revalidate, pre-check=0, post-check=0" - ], - "x-connection-hash": [ - "70096c3d4682181526d420b5bfc0b81d" - ], - "x-frame-options": [ - "SAMEORIGIN" - ], - "pragma": [ - "no-cache" - ], - "date": [ - "Sat, 13 Jul 2019 02:27:36 GMT" - ], - "status": [ - "200 OK" - ], - "set-cookie": [ - "personalization_id=\"v1_JYZuFmKTT7K2f0msldR7fg==\"; Max-Age=63072000; Expires=Mon, 12 Jul 2021 02:27:36 GMT; Path=/; Domain=.twitter.com", - "lang=en; Path=/", - "guest_id=v1%3A156298485665169401; Max-Age=63072000; Expires=Mon, 12 Jul 2021 02:27:36 GMT; Path=/; Domain=.twitter.com" - ], - "x-access-level": [ - "read-write-directmessages" - ], - "x-twitter-response-tags": [ - "BouncerCompliant" - ], - "x-transaction": [ - "00a805710067ce43" - ], - "strict-transport-security": [ - "max-age=631138519" - ], - "content-disposition": [ - "attachment; filename=json.json" - ], - "content-length": [ - "2460" - ], - "x-response-time": [ - "90" - ] - }, - "body": { - "string": "{\"id\":783214,\"id_str\":\"783214\",\"name\":\"Twitter\",\"screen_name\":\"Twitter\",\"location\":\"Everywhere\",\"description\":\"What\\u2019s happening?!\",\"url\":\"https:\\/\\/t.co\\/TAXQpsHa5X\",\"entities\":{\"url\":{\"urls\":[{\"url\":\"https:\\/\\/t.co\\/TAXQpsHa5X\",\"expanded_url\":\"https:\\/\\/about.twitter.com\\/\",\"display_url\":\"about.twitter.com\",\"indices\":[0,23]}]},\"description\":{\"urls\":[]}},\"protected\":false,\"followers_count\":56335782,\"friends_count\":140,\"listed_count\":90877,\"created_at\":\"Tue Feb 20 14:35:54 +0000 2007\",\"favourites_count\":5965,\"utc_offset\":null,\"time_zone\":null,\"geo_enabled\":true,\"verified\":true,\"statuses_count\":10829,\"lang\":null,\"status\":{\"created_at\":\"Fri Jul 12 20:00:49 +0000 2019\",\"id\":1149770607585824769,\"id_str\":\"1149770607585824769\",\"text\":\"@Caleb_Brentley Solid select\",\"truncated\":false,\"entities\":{\"hashtags\":[],\"symbols\":[],\"user_mentions\":[{\"screen_name\":\"Caleb_Brentley\",\"name\":\"Caleb B. Gwaltney\",\"id\":3387807501,\"id_str\":\"3387807501\",\"indices\":[0,15]}],\"urls\":[]},\"source\":\"\\u003ca href=\\\"http:\\/\\/twitter.com\\\" rel=\\\"nofollow\\\"\\u003eTwitter Web Client\\u003c\\/a\\u003e\",\"in_reply_to_status_id\":1149682806483804160,\"in_reply_to_status_id_str\":\"1149682806483804160\",\"in_reply_to_user_id\":3387807501,\"in_reply_to_user_id_str\":\"3387807501\",\"in_reply_to_screen_name\":\"Caleb_Brentley\",\"geo\":null,\"coordinates\":null,\"place\":null,\"contributors\":null,\"is_quote_status\":false,\"retweet_count\":6,\"favorite_count\":126,\"favorited\":false,\"retweeted\":false,\"lang\":\"en\"},\"contributors_enabled\":false,\"is_translator\":false,\"is_translation_enabled\":false,\"profile_background_color\":\"ACDED6\",\"profile_background_image_url\":\"http:\\/\\/abs.twimg.com\\/images\\/themes\\/theme18\\/bg.gif\",\"profile_background_image_url_https\":\"https:\\/\\/abs.twimg.com\\/images\\/themes\\/theme18\\/bg.gif\",\"profile_background_tile\":true,\"profile_image_url\":\"http:\\/\\/pbs.twimg.com\\/profile_images\\/1111729635610382336\\/_65QFl7B_normal.png\",\"profile_image_url_https\":\"https:\\/\\/pbs.twimg.com\\/profile_images\\/1111729635610382336\\/_65QFl7B_normal.png\",\"profile_banner_url\":\"https:\\/\\/pbs.twimg.com\\/profile_banners\\/783214\\/1556918042\",\"profile_link_color\":\"1B95E0\",\"profile_sidebar_border_color\":\"FFFFFF\",\"profile_sidebar_fill_color\":\"F6F6F6\",\"profile_text_color\":\"333333\",\"profile_use_background_image\":true,\"has_extended_profile\":true,\"default_profile\":false,\"default_profile_image\":false,\"following\":true,\"follow_request_sent\":false,\"notifications\":false,\"muting\":false,\"translator_type\":\"regular\"}" - } - } - }, - { - "request": { - "method": "POST", - "uri": "https://api.twitter.com/1.1/blocks/destroy.json?id=twitter", - "body": null, - "headers": { - "Host": [ - "api.twitter.com" - ], - "Content-Length": [ - "0" - ] - } - }, - "response": { - "status": { - "code": 200, - "message": "OK" - }, - "headers": { - "content-type": [ - "application/json;charset=utf-8" - ], - "x-xss-protection": [ - "1; mode=block; report=https://twitter.com/i/xss_report" - ], - "x-content-type-options": [ - "nosniff" - ], - "expires": [ - "Tue, 31 Mar 1981 05:00:00 GMT" - ], - "last-modified": [ - "Sat, 13 Jul 2019 02:27:37 GMT" - ], - "server": [ - "tsa_b" - ], - "cache-control": [ - "no-cache, no-store, must-revalidate, pre-check=0, post-check=0" - ], - "x-connection-hash": [ - "dd66252d86130eb957f39f9dedb23030" - ], - "x-frame-options": [ - "SAMEORIGIN" - ], - "pragma": [ - "no-cache" - ], - "date": [ - "Sat, 13 Jul 2019 02:27:37 GMT" - ], - "status": [ - "200 OK" - ], - "set-cookie": [ - "personalization_id=\"v1_VGDiFHXXuIvcNaCUYo5L6Q==\"; Max-Age=63072000; Expires=Mon, 12 Jul 2021 02:27:37 GMT; Path=/; Domain=.twitter.com", - "lang=en; Path=/", - "guest_id=v1%3A156298485699196902; Max-Age=63072000; Expires=Mon, 12 Jul 2021 02:27:37 GMT; Path=/; Domain=.twitter.com" - ], - "x-access-level": [ - "read-write-directmessages" - ], - "x-twitter-response-tags": [ - "BouncerCompliant" - ], - "x-transaction": [ - "0068cf1000bda1af" - ], - "strict-transport-security": [ - "max-age=631138519" - ], - "content-disposition": [ - "attachment; filename=json.json" - ], - "content-length": [ - "2461" - ], - "x-response-time": [ - "89" - ] - }, - "body": { - "string": "{\"id\":783214,\"id_str\":\"783214\",\"name\":\"Twitter\",\"screen_name\":\"Twitter\",\"location\":\"Everywhere\",\"description\":\"What\\u2019s happening?!\",\"url\":\"https:\\/\\/t.co\\/TAXQpsHa5X\",\"entities\":{\"url\":{\"urls\":[{\"url\":\"https:\\/\\/t.co\\/TAXQpsHa5X\",\"expanded_url\":\"https:\\/\\/about.twitter.com\\/\",\"display_url\":\"about.twitter.com\",\"indices\":[0,23]}]},\"description\":{\"urls\":[]}},\"protected\":false,\"followers_count\":56335781,\"friends_count\":140,\"listed_count\":90877,\"created_at\":\"Tue Feb 20 14:35:54 +0000 2007\",\"favourites_count\":5965,\"utc_offset\":null,\"time_zone\":null,\"geo_enabled\":true,\"verified\":true,\"statuses_count\":10829,\"lang\":null,\"status\":{\"created_at\":\"Fri Jul 12 20:00:49 +0000 2019\",\"id\":1149770607585824769,\"id_str\":\"1149770607585824769\",\"text\":\"@Caleb_Brentley Solid select\",\"truncated\":false,\"entities\":{\"hashtags\":[],\"symbols\":[],\"user_mentions\":[{\"screen_name\":\"Caleb_Brentley\",\"name\":\"Caleb B. Gwaltney\",\"id\":3387807501,\"id_str\":\"3387807501\",\"indices\":[0,15]}],\"urls\":[]},\"source\":\"\\u003ca href=\\\"http:\\/\\/twitter.com\\\" rel=\\\"nofollow\\\"\\u003eTwitter Web Client\\u003c\\/a\\u003e\",\"in_reply_to_status_id\":1149682806483804160,\"in_reply_to_status_id_str\":\"1149682806483804160\",\"in_reply_to_user_id\":3387807501,\"in_reply_to_user_id_str\":\"3387807501\",\"in_reply_to_screen_name\":\"Caleb_Brentley\",\"geo\":null,\"coordinates\":null,\"place\":null,\"contributors\":null,\"is_quote_status\":false,\"retweet_count\":6,\"favorite_count\":126,\"favorited\":false,\"retweeted\":false,\"lang\":\"en\"},\"contributors_enabled\":false,\"is_translator\":false,\"is_translation_enabled\":false,\"profile_background_color\":\"ACDED6\",\"profile_background_image_url\":\"http:\\/\\/abs.twimg.com\\/images\\/themes\\/theme18\\/bg.gif\",\"profile_background_image_url_https\":\"https:\\/\\/abs.twimg.com\\/images\\/themes\\/theme18\\/bg.gif\",\"profile_background_tile\":true,\"profile_image_url\":\"http:\\/\\/pbs.twimg.com\\/profile_images\\/1111729635610382336\\/_65QFl7B_normal.png\",\"profile_image_url_https\":\"https:\\/\\/pbs.twimg.com\\/profile_images\\/1111729635610382336\\/_65QFl7B_normal.png\",\"profile_banner_url\":\"https:\\/\\/pbs.twimg.com\\/profile_banners\\/783214\\/1556918042\",\"profile_link_color\":\"1B95E0\",\"profile_sidebar_border_color\":\"FFFFFF\",\"profile_sidebar_fill_color\":\"F6F6F6\",\"profile_text_color\":\"333333\",\"profile_use_background_image\":true,\"has_extended_profile\":true,\"default_profile\":false,\"default_profile_image\":false,\"following\":false,\"follow_request_sent\":false,\"notifications\":false,\"muting\":false,\"translator_type\":\"regular\"}" - } - } - }, - { - "request": { - "method": "POST", - "uri": "https://api.twitter.com/1.1/friendships/create.json?id=twitter", - "body": null, - "headers": { - "Host": [ - "api.twitter.com" - ], - "Content-Length": [ - "0" - ] - } - }, - "response": { - "status": { - "code": 200, - "message": "OK" - }, - "headers": { - "content-type": [ - "application/json;charset=utf-8" - ], - "x-xss-protection": [ - "1; mode=block; report=https://twitter.com/i/xss_report" - ], - "x-content-type-options": [ - "nosniff" - ], - "expires": [ - "Tue, 31 Mar 1981 05:00:00 GMT" - ], - "last-modified": [ - "Sat, 13 Jul 2019 02:27:37 GMT" - ], - "server": [ - "tsa_b" - ], - "cache-control": [ - "no-cache, no-store, must-revalidate, pre-check=0, post-check=0" - ], - "x-connection-hash": [ - "00238de9d6dbb0e4665d90b16b0c82a0" - ], - "x-frame-options": [ - "SAMEORIGIN" - ], - "pragma": [ - "no-cache" - ], - "date": [ - "Sat, 13 Jul 2019 02:27:37 GMT" - ], - "status": [ - "200 OK" - ], - "set-cookie": [ - "personalization_id=\"v1_DPjm3czhYTb18wsfYRhMnQ==\"; Max-Age=63072000; Expires=Mon, 12 Jul 2021 02:27:37 GMT; Path=/; Domain=.twitter.com", - "lang=en; Path=/", - "guest_id=v1%3A156298485736153557; Max-Age=63072000; Expires=Mon, 12 Jul 2021 02:27:37 GMT; Path=/; Domain=.twitter.com" - ], - "x-access-level": [ - "read-write-directmessages" - ], - "x-twitter-response-tags": [ - "BouncerCompliant" - ], - "x-transaction": [ - "00e0e3f900716a98" - ], - "strict-transport-security": [ - "max-age=631138519" - ], - "content-disposition": [ - "attachment; filename=json.json" - ], - "content-length": [ - "2461" - ], - "x-response-time": [ - "99" - ] - }, - "body": { - "string": "{\"id\":783214,\"id_str\":\"783214\",\"name\":\"Twitter\",\"screen_name\":\"Twitter\",\"location\":\"Everywhere\",\"description\":\"What\\u2019s happening?!\",\"url\":\"https:\\/\\/t.co\\/TAXQpsHa5X\",\"entities\":{\"url\":{\"urls\":[{\"url\":\"https:\\/\\/t.co\\/TAXQpsHa5X\",\"expanded_url\":\"https:\\/\\/about.twitter.com\\/\",\"display_url\":\"about.twitter.com\",\"indices\":[0,23]}]},\"description\":{\"urls\":[]}},\"protected\":false,\"followers_count\":56335782,\"friends_count\":140,\"listed_count\":90877,\"created_at\":\"Tue Feb 20 14:35:54 +0000 2007\",\"favourites_count\":5965,\"utc_offset\":null,\"time_zone\":null,\"geo_enabled\":true,\"verified\":true,\"statuses_count\":10829,\"lang\":null,\"status\":{\"created_at\":\"Fri Jul 12 20:00:49 +0000 2019\",\"id\":1149770607585824769,\"id_str\":\"1149770607585824769\",\"text\":\"@Caleb_Brentley Solid select\",\"truncated\":false,\"entities\":{\"hashtags\":[],\"symbols\":[],\"user_mentions\":[{\"screen_name\":\"Caleb_Brentley\",\"name\":\"Caleb B. Gwaltney\",\"id\":3387807501,\"id_str\":\"3387807501\",\"indices\":[0,15]}],\"urls\":[]},\"source\":\"\\u003ca href=\\\"http:\\/\\/twitter.com\\\" rel=\\\"nofollow\\\"\\u003eTwitter Web Client\\u003c\\/a\\u003e\",\"in_reply_to_status_id\":1149682806483804160,\"in_reply_to_status_id_str\":\"1149682806483804160\",\"in_reply_to_user_id\":3387807501,\"in_reply_to_user_id_str\":\"3387807501\",\"in_reply_to_screen_name\":\"Caleb_Brentley\",\"geo\":null,\"coordinates\":null,\"place\":null,\"contributors\":null,\"is_quote_status\":false,\"retweet_count\":6,\"favorite_count\":126,\"favorited\":false,\"retweeted\":false,\"lang\":\"en\"},\"contributors_enabled\":false,\"is_translator\":false,\"is_translation_enabled\":false,\"profile_background_color\":\"ACDED6\",\"profile_background_image_url\":\"http:\\/\\/abs.twimg.com\\/images\\/themes\\/theme18\\/bg.gif\",\"profile_background_image_url_https\":\"https:\\/\\/abs.twimg.com\\/images\\/themes\\/theme18\\/bg.gif\",\"profile_background_tile\":true,\"profile_image_url\":\"http:\\/\\/pbs.twimg.com\\/profile_images\\/1111729635610382336\\/_65QFl7B_normal.png\",\"profile_image_url_https\":\"https:\\/\\/pbs.twimg.com\\/profile_images\\/1111729635610382336\\/_65QFl7B_normal.png\",\"profile_banner_url\":\"https:\\/\\/pbs.twimg.com\\/profile_banners\\/783214\\/1556918042\",\"profile_link_color\":\"1B95E0\",\"profile_sidebar_border_color\":\"FFFFFF\",\"profile_sidebar_fill_color\":\"F6F6F6\",\"profile_text_color\":\"333333\",\"profile_use_background_image\":true,\"has_extended_profile\":true,\"default_profile\":false,\"default_profile_image\":false,\"following\":false,\"follow_request_sent\":false,\"notifications\":false,\"muting\":false,\"translator_type\":\"regular\"}" - } - } - } - ] -} \ No newline at end of file diff --git a/cassettes/testcreatedestroyblock.yaml b/cassettes/testcreatedestroyblock.yaml new file mode 100644 index 0000000..54139de --- /dev/null +++ b/cassettes/testcreatedestroyblock.yaml @@ -0,0 +1,254 @@ +interactions: +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - python-requests/2.25.1 + method: POST + uri: https://api.twitter.com/1.1/blocks/create.json?id=twitter + response: + body: + string: !!binary | + H4sIAAAAAAAAAKxW2a7bNhD9FVcvfahxLWqzbKBosyIvfSgSoAGiC4KSRhIbilRIKo5z4X/PaLPk + 5aIFWhmwzJkzCzlnhn5yeO7st7HvkWCNv6mx2tk7g8BZO5LVgOsPB24taBSYTANIeiMXKmOWK4lC + +Ar6eKhAA8pzQAvejKq/KmZ/NquKNQ1ILsvffkJIqwWqKmsbs082ycY+ZCrZfHjx8c/GvGPhR4SA + tNxyMM7+aYD3L1x+evpX5t8aJnPI6TWWpaq1D3bYBdrVyabLmZtGsOOIvsEggsucZ106n9y15z+e + Hk9XOz3n93hCVaOVhcwCHnXBhIG1Uygh1AG0oZlqpXX24Y74JIi3qNIcZH5WuHi23KDtJIi3hHhr + B+vAOimzXR1aWL2FdOW5KxLs/XAfBqtfXHxQ4m4x4YJ9Va3mFs5+Iz9CL63NqCoKAyiRrRBrx/Ia + 6HclYRKUoChIlooufatbzB4LzAs+r41ltjWzbxK4kY95M1lOXgZIdzCXiVdtnzghKxJj1ntvTtwj + 3UljEOKHu50fx2EYk3hHdrvAXXD1jhbtLHzr/P/+x3dkqlb01btV0uaxn+M3kI6ZmLrM2LIoS5ZV + zFSWlX0JMftjnSoxLnCnmtYdWMmBgpdNMYecG+g9cqg6YgpexNi4rcjdBls/uGi8s+yKZIQgydYz + qTAlrGfWuU5a1/Uztqo0FL8mC3IfDocH02guP4uB285Kg0CIVAP9ksEW3o+gwRN2xSDuU6AaGnGk + VtGhgnQuSLR13TiM4piQMH4Ge1GjC4Mr7/2hXp/Krf7uMS3iPl8IpPHExUwpnXOJtTeTCPs9g1kv + reZpa5U+A7ihX1rsYjoReeSMBnsAsHMbD73Wtdok80LPm6X5telCMjSM08rcOV2mMXfgCMV8rGbS + CIbqe1Ik540RzqGCC6Apyz6XGrPrhoro7J0Xr16/eR05dzG8ZiUsZuc4Ok03FOtyGJs9xuD0raA+ + v0mcbNLyoeTFPzimPWuvRvN/929xPc2oSX13M81lsAssBkP6BsF2FwU4ZnCgBkHsJ5uXVhZ1sG2o + VLpm4uHvpnTuhLmztf8/WsqkxP64vt6eCTSgMdJwzWPEiJBd6Ia+u/ApcCac6UFe7sI3S63hOaRM + 0xRbCSNPuLf9cweHCzGjou6zQHXT+qz1+2ehxd6/Yc1UVpzTFI2hv95Hg0mXQ8FaYWfx2AZX8snh + xdXMu04c3AwCHDJfWjCWGuiaegRLZfEmHP76zEOhbm1vPy7nRqX22HSTSUPZCqad0w8AAAD//wMA + HctSkYAJAAA= + headers: + cache-control: + - no-cache, no-store, must-revalidate, pre-check=0, post-check=0 + content-disposition: + - attachment; filename=json.json + content-encoding: + - gzip + content-length: + - '977' + content-type: + - application/json;charset=utf-8 + date: + - Fri, 12 Feb 2021 03:32:50 GMT + expires: + - Tue, 31 Mar 1981 05:00:00 GMT + last-modified: + - Fri, 12 Feb 2021 03:32:50 GMT + pragma: + - no-cache + server: + - tsa_b + set-cookie: + - personalization_id="v1_3IjJc5ujYB/RfhVWX9yT0w=="; Max-Age=63072000; Expires=Sun, + 12 Feb 2023 03:32:50 GMT; Path=/; Domain=.twitter.com; Secure; SameSite=None + - lang=en; Path=/ + - guest_id=v1%3A161310077008545787; Max-Age=63072000; Expires=Sun, 12 Feb 2023 + 03:32:50 GMT; Path=/; Domain=.twitter.com; Secure; SameSite=None + status: + - 200 OK + strict-transport-security: + - max-age=631138519 + x-access-level: + - read-write-directmessages + x-connection-hash: + - 261efd1d4019062411624e7a82447873 + x-content-type-options: + - nosniff + x-frame-options: + - SAMEORIGIN + x-response-time: + - '92' + x-transaction: + - 0000c5ec001c2ba6 + x-twitter-response-tags: + - BouncerCompliant + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + Cookie: + - guest_id=v1%3A161310077008545787; personalization_id="v1_3IjJc5ujYB/RfhVWX9yT0w=="; + lang=en + User-Agent: + - python-requests/2.25.1 + method: POST + uri: https://api.twitter.com/1.1/blocks/destroy.json?id=twitter + response: + body: + string: !!binary | + H4sIAAAAAAAAAKxW2a7bNhD9FVcvfahxLWqzbKBosyIvfSgSoAGiC4KSRhIbilRIKo5z4X/PaLPk + 5aIFWhmwzJkzCzlnhn5yeO7st7HvkWCNv6mx2tk7g8BZO5LVgOsPB24taBSYTANIeiMXKmOWK4lC + +Ar6eKhAA8pzQAvejKq/KmZ/NquKNQ1ILsvffkJIqwWqKmsbs082ycY+ZCrZfHjx8c/GvGPhR4SA + tNxyMM7+aYD3L1x+evpX5t8aJnPI6TWWpaq1D3bYBdrVyabLmZtGsOOIvsEggsucZ106n9y15z+e + Hk9XOz3n93hCVaOVhcwCHnXBhIG1Uygh1AG0oZlqpXX24Y74JIi3qNIcZH5WuHi23KDtJIi3hHhr + B+vAOimzXR1aWL2FdOW5KxLs/XAfBqtfXHxQ4m4x4YJ9Va3mFs5+Iz9CL63NqCoKAyiRrRBrx/Ia + 6HclYRKUoChIlooufatbzB4LzAs+r41ltjWzbxK4kY95M1lOXgZIdzCXiVdtnzghKxJj1ntvTtwj + 3UljEOKHu50fx2EYk3hHdrvAXXD1jhbtLHzr/P/+x3dkqlb01btV0uaxn+M3kI6ZmLrM2LIoS5ZV + zFSWlX0JMftjnSoxLnCnmtYdWMmBgpdNMYecG+g9cqg6YgpexNi4rcjdBls/uGi8s+yKZIQgydYz + qTAlrGfWuU5a1/Uztqo0FL8mC3IfDocH02guP4uB285Kg0CIVAP9ksEW3o+gwRN2xSDuU6AaGnGk + VtGhgnQuSLR13TiM4piQMH4Ge1GjC4Mr7/2hXp/Krf7uMS3iPl8IpPHExUwpnXOJtTeTCPs9g1kv + reZpa5U+A7ihX1rsYjoReeSMBnsAsHMbD73Wtdok80LPm6X5telCMjSM08rcOV2mMXfgCMV8rGbS + CIbqe1Ik540RzqGCC6Apyz6XGrPrhoro7J0Xr16/eR05dzG8ZiUsZuc4Ok03FOtyGJs9xuD0raA+ + v0mcbNLyoeTFPzimPWuvRvN/929xPc2oSX13M81lsAssBkP6BsF2FwU4ZnCgBkHsJ5uXVhZ1sG2o + VLpm4uHvpnTuhLmztf8/WsqkxP64vt6eCTSgMdJwzWPEiJBd6Ia+u/ApcCac6UFe7sI3S63hOaRM + 0xRbCSNPuLf9cweHCzGjou6zQHXT+qz1+2ehxd6/Yc1UVpzTFI2hv95Hg0mXQ8FaYWfx2AZX8snh + xdXMu068kOCU+dKCsdRA19WjTiqLV+Hw32eeCnVrlw7mTqX22HSjSUPZCqad0w8AAAD//wMA9z5R + goEJAAA= + headers: + cache-control: + - no-cache, no-store, must-revalidate, pre-check=0, post-check=0 + content-disposition: + - attachment; filename=json.json + content-encoding: + - gzip + content-length: + - '974' + content-type: + - application/json;charset=utf-8 + date: + - Fri, 12 Feb 2021 03:32:50 GMT + expires: + - Tue, 31 Mar 1981 05:00:00 GMT + last-modified: + - Fri, 12 Feb 2021 03:32:50 GMT + pragma: + - no-cache + server: + - tsa_b + status: + - 200 OK + strict-transport-security: + - max-age=631138519 + x-access-level: + - read-write-directmessages + x-connection-hash: + - 30c198da0f47067b5ed2c6491235eb99 + x-content-type-options: + - nosniff + x-frame-options: + - SAMEORIGIN + x-response-time: + - '94' + x-transaction: + - 001b410e00a54f73 + x-twitter-response-tags: + - BouncerCompliant + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + Cookie: + - guest_id=v1%3A161310077008545787; personalization_id="v1_3IjJc5ujYB/RfhVWX9yT0w=="; + lang=en + User-Agent: + - python-requests/2.25.1 + method: POST + uri: https://api.twitter.com/1.1/friendships/create.json?screen_name=twitter + response: + body: + string: !!binary | + H4sIAAAAAAAAAKxW2a7bNhD9FVcvfahxLWqzbKBosyIvfSgSoAGiC4KSRhIbilRIKo5z4X/PaLPk + 5aIFWhmwzJkzCzlnhn5yeO7st7HvkWCNv6mx2tk7g8BZO5LVgOsPB24taBSYTANIeiMXKmOWK4lC + +Ar6eKhAA8pzQAvejKq/KmZ/NquKNQ1ILsvffkJIqwWqKmsbs082ycY+ZCrZfHjx8c/GvGPhR4SA + tNxyMM7+aYD3L1x+evpX5t8aJnPI6TWWpaq1D3bYBdrVyabLmZtGsOOIvsEggsucZ106n9y15z+e + Hk9XOz3n93hCVaOVhcwCHnXBhIG1Uygh1AG0oZlqpXX24Y74JIhjVGkOMj8rXDxbbtB2EsRbQry1 + g3VgnZTZrg4trN5CuvLcFQn2frgPg9UvLj4ocbeYcMG+qlZzC2e/kR+hl9ZmVBWFAZTIVoi1Y3kN + 9LuSMAlKUBQkS0WXvtUtZo8F5gWf18Yy25rZNwncyMe8mSwnLwOkO5jLxKu2T5yQFYkx6703J+6R + 7qQxCPHD3c6P4zCMSbwju13gLrh6R4t2Fr51/n//4zsyVSv66t0qafPYz/EbSMdMTF1mbFmUJcsq + ZirLyr6EmP2xTpUYF7hTTesOrORAwcummEPODfQeOVQdMQUvYmzcVuRug60fXDTeWXZFMkKQZOuZ + VJgS1jPrXCet6/oZW1Uail+TBbkPh8ODaTSXn8XAbWelQSBEqoF+yWAL70fQ4Am7YhD3KVANjThS + q+hQQToXJNq6bhxGcUxIGD+DvajRhcGV9/5Qr0/lVn/3mBZxny8E0njiYqaUzrnE2ptJhP2ewayX + VvO0tUqfAdzQLy12MZ2IPHJGgz0A2LmNh17rWm2SeaHnzdL82nQhGRrGaWXunC7TmDtwhGI+VjNp + BEP1PSmS88YI51DBBdCUZZ9Ljdl1Q0V09s6LV6/fvI6cuxhesxIWs3McnaYbinU5jM0eY3D6VlCf + 3yRONmn5UPLiHxzTnrVXo/m/+7e4nmbUpL67meYy2AUWgyF9g2C7iwIcMzhQgyD2k81LK4s62DZU + Kl0z8fB3Uzp3wtzZ2v8fLWVSYn9cX2/PBBrQGGm45jFiRMgudEPfXfgUOBPO9CAvd+GbpdbwHFKm + aYqthJEn3Nv+uYPDhZhRUfdZoLppfdb6/bPQYu/fsGYqK85pisbQX++jwaTLoWCtsLN4bIMr+eTw + 4mrmXSdeSHDKfGnBWGqg6+pRJ5XFq3D47zNPhbq1Swdzp1J7bLrRpKFsBdPO6QcAAAD//wMAU7WB + /4EJAAA= + headers: + cache-control: + - no-cache, no-store, must-revalidate, pre-check=0, post-check=0 + content-disposition: + - attachment; filename=json.json + content-encoding: + - gzip + content-length: + - '974' + content-type: + - application/json;charset=utf-8 + date: + - Fri, 12 Feb 2021 03:32:50 GMT + expires: + - Tue, 31 Mar 1981 05:00:00 GMT + last-modified: + - Fri, 12 Feb 2021 03:32:50 GMT + pragma: + - no-cache + server: + - tsa_b + status: + - 200 OK + strict-transport-security: + - max-age=631138519 + x-access-level: + - read-write-directmessages + x-connection-hash: + - 314c06a53311201c90cfc22f7a61036c + x-content-type-options: + - nosniff + x-frame-options: + - SAMEORIGIN + x-response-time: + - '109' + x-transaction: + - 008b6c4700b8ff7c + x-twitter-response-tags: + - BouncerCompliant + x-xss-protection: + - '0' + status: + code: 200 + message: OK +version: 1 diff --git a/cassettes/testcreatedestroyfriendship.json b/cassettes/testcreatedestroyfriendship.json deleted file mode 100644 index a3bfb60..0000000 --- a/cassettes/testcreatedestroyfriendship.json +++ /dev/null @@ -1,181 +0,0 @@ -{ - "version": 1, - "interactions": [ - { - "request": { - "method": "POST", - "uri": "https://api.twitter.com/1.1/friendships/destroy.json?id=Twitter", - "body": null, - "headers": { - "Host": [ - "api.twitter.com" - ], - "Content-Length": [ - "0" - ] - } - }, - "response": { - "status": { - "code": 200, - "message": "OK" - }, - "headers": { - "content-type": [ - "application/json;charset=utf-8" - ], - "x-xss-protection": [ - "1; mode=block; report=https://twitter.com/i/xss_report" - ], - "x-content-type-options": [ - "nosniff" - ], - "expires": [ - "Tue, 31 Mar 1981 05:00:00 GMT" - ], - "last-modified": [ - "Sat, 13 Jul 2019 02:27:38 GMT" - ], - "server": [ - "tsa_b" - ], - "cache-control": [ - "no-cache, no-store, must-revalidate, pre-check=0, post-check=0" - ], - "x-connection-hash": [ - "9f07dc9c1bd9cd408a8bc4027b23a0d0" - ], - "x-frame-options": [ - "SAMEORIGIN" - ], - "pragma": [ - "no-cache" - ], - "date": [ - "Sat, 13 Jul 2019 02:27:38 GMT" - ], - "status": [ - "200 OK" - ], - "set-cookie": [ - "personalization_id=\"v1_C9IUZyUwH4r9TN1oA2ZLvg==\"; Max-Age=63072000; Expires=Mon, 12 Jul 2021 02:27:38 GMT; Path=/; Domain=.twitter.com", - "lang=en; Path=/", - "guest_id=v1%3A156298485842199201; Max-Age=63072000; Expires=Mon, 12 Jul 2021 02:27:38 GMT; Path=/; Domain=.twitter.com" - ], - "x-access-level": [ - "read-write-directmessages" - ], - "x-twitter-response-tags": [ - "BouncerCompliant" - ], - "x-transaction": [ - "0056fae9009c11ea" - ], - "strict-transport-security": [ - "max-age=631138519" - ], - "content-disposition": [ - "attachment; filename=json.json" - ], - "content-length": [ - "2460" - ], - "x-response-time": [ - "100" - ] - }, - "body": { - "string": "{\"id\":783214,\"id_str\":\"783214\",\"name\":\"Twitter\",\"screen_name\":\"Twitter\",\"location\":\"Everywhere\",\"description\":\"What\\u2019s happening?!\",\"url\":\"https:\\/\\/t.co\\/TAXQpsHa5X\",\"entities\":{\"url\":{\"urls\":[{\"url\":\"https:\\/\\/t.co\\/TAXQpsHa5X\",\"expanded_url\":\"https:\\/\\/about.twitter.com\\/\",\"display_url\":\"about.twitter.com\",\"indices\":[0,23]}]},\"description\":{\"urls\":[]}},\"protected\":false,\"followers_count\":56335781,\"friends_count\":140,\"listed_count\":90877,\"created_at\":\"Tue Feb 20 14:35:54 +0000 2007\",\"favourites_count\":5965,\"utc_offset\":null,\"time_zone\":null,\"geo_enabled\":true,\"verified\":true,\"statuses_count\":10829,\"lang\":null,\"status\":{\"created_at\":\"Fri Jul 12 20:00:49 +0000 2019\",\"id\":1149770607585824769,\"id_str\":\"1149770607585824769\",\"text\":\"@Caleb_Brentley Solid select\",\"truncated\":false,\"entities\":{\"hashtags\":[],\"symbols\":[],\"user_mentions\":[{\"screen_name\":\"Caleb_Brentley\",\"name\":\"Caleb B. Gwaltney\",\"id\":3387807501,\"id_str\":\"3387807501\",\"indices\":[0,15]}],\"urls\":[]},\"source\":\"\\u003ca href=\\\"http:\\/\\/twitter.com\\\" rel=\\\"nofollow\\\"\\u003eTwitter Web Client\\u003c\\/a\\u003e\",\"in_reply_to_status_id\":1149682806483804160,\"in_reply_to_status_id_str\":\"1149682806483804160\",\"in_reply_to_user_id\":3387807501,\"in_reply_to_user_id_str\":\"3387807501\",\"in_reply_to_screen_name\":\"Caleb_Brentley\",\"geo\":null,\"coordinates\":null,\"place\":null,\"contributors\":null,\"is_quote_status\":false,\"retweet_count\":6,\"favorite_count\":126,\"favorited\":false,\"retweeted\":false,\"lang\":\"en\"},\"contributors_enabled\":false,\"is_translator\":false,\"is_translation_enabled\":false,\"profile_background_color\":\"ACDED6\",\"profile_background_image_url\":\"http:\\/\\/abs.twimg.com\\/images\\/themes\\/theme18\\/bg.gif\",\"profile_background_image_url_https\":\"https:\\/\\/abs.twimg.com\\/images\\/themes\\/theme18\\/bg.gif\",\"profile_background_tile\":true,\"profile_image_url\":\"http:\\/\\/pbs.twimg.com\\/profile_images\\/1111729635610382336\\/_65QFl7B_normal.png\",\"profile_image_url_https\":\"https:\\/\\/pbs.twimg.com\\/profile_images\\/1111729635610382336\\/_65QFl7B_normal.png\",\"profile_banner_url\":\"https:\\/\\/pbs.twimg.com\\/profile_banners\\/783214\\/1556918042\",\"profile_link_color\":\"1B95E0\",\"profile_sidebar_border_color\":\"FFFFFF\",\"profile_sidebar_fill_color\":\"F6F6F6\",\"profile_text_color\":\"333333\",\"profile_use_background_image\":true,\"has_extended_profile\":true,\"default_profile\":false,\"default_profile_image\":false,\"following\":true,\"follow_request_sent\":false,\"notifications\":false,\"muting\":false,\"translator_type\":\"regular\"}" - } - } - }, - { - "request": { - "method": "POST", - "uri": "https://api.twitter.com/1.1/friendships/create.json?id=Twitter", - "body": null, - "headers": { - "Host": [ - "api.twitter.com" - ], - "Content-Length": [ - "0" - ] - } - }, - "response": { - "status": { - "code": 200, - "message": "OK" - }, - "headers": { - "content-type": [ - "application/json;charset=utf-8" - ], - "x-xss-protection": [ - "1; mode=block; report=https://twitter.com/i/xss_report" - ], - "x-content-type-options": [ - "nosniff" - ], - "expires": [ - "Tue, 31 Mar 1981 05:00:00 GMT" - ], - "last-modified": [ - "Sat, 13 Jul 2019 02:27:38 GMT" - ], - "server": [ - "tsa_b" - ], - "cache-control": [ - "no-cache, no-store, must-revalidate, pre-check=0, post-check=0" - ], - "x-connection-hash": [ - "aaa5c82f83101d2b56aabec36997b7ff" - ], - "x-frame-options": [ - "SAMEORIGIN" - ], - "pragma": [ - "no-cache" - ], - "date": [ - "Sat, 13 Jul 2019 02:27:38 GMT" - ], - "status": [ - "200 OK" - ], - "set-cookie": [ - "personalization_id=\"v1_+9k7gvcrA072uDUYPf3X+g==\"; Max-Age=63072000; Expires=Mon, 12 Jul 2021 02:27:38 GMT; Path=/; Domain=.twitter.com", - "lang=en; Path=/", - "guest_id=v1%3A156298485875959313; Max-Age=63072000; Expires=Mon, 12 Jul 2021 02:27:38 GMT; Path=/; Domain=.twitter.com" - ], - "x-access-level": [ - "read-write-directmessages" - ], - "x-twitter-response-tags": [ - "BouncerCompliant" - ], - "x-transaction": [ - "004f2343003f52c0" - ], - "strict-transport-security": [ - "max-age=631138519" - ], - "content-disposition": [ - "attachment; filename=json.json" - ], - "content-length": [ - "2461" - ], - "x-response-time": [ - "92" - ] - }, - "body": { - "string": "{\"id\":783214,\"id_str\":\"783214\",\"name\":\"Twitter\",\"screen_name\":\"Twitter\",\"location\":\"Everywhere\",\"description\":\"What\\u2019s happening?!\",\"url\":\"https:\\/\\/t.co\\/TAXQpsHa5X\",\"entities\":{\"url\":{\"urls\":[{\"url\":\"https:\\/\\/t.co\\/TAXQpsHa5X\",\"expanded_url\":\"https:\\/\\/about.twitter.com\\/\",\"display_url\":\"about.twitter.com\",\"indices\":[0,23]}]},\"description\":{\"urls\":[]}},\"protected\":false,\"followers_count\":56335782,\"friends_count\":140,\"listed_count\":90877,\"created_at\":\"Tue Feb 20 14:35:54 +0000 2007\",\"favourites_count\":5965,\"utc_offset\":null,\"time_zone\":null,\"geo_enabled\":true,\"verified\":true,\"statuses_count\":10829,\"lang\":null,\"status\":{\"created_at\":\"Fri Jul 12 20:00:49 +0000 2019\",\"id\":1149770607585824769,\"id_str\":\"1149770607585824769\",\"text\":\"@Caleb_Brentley Solid select\",\"truncated\":false,\"entities\":{\"hashtags\":[],\"symbols\":[],\"user_mentions\":[{\"screen_name\":\"Caleb_Brentley\",\"name\":\"Caleb B. Gwaltney\",\"id\":3387807501,\"id_str\":\"3387807501\",\"indices\":[0,15]}],\"urls\":[]},\"source\":\"\\u003ca href=\\\"http:\\/\\/twitter.com\\\" rel=\\\"nofollow\\\"\\u003eTwitter Web Client\\u003c\\/a\\u003e\",\"in_reply_to_status_id\":1149682806483804160,\"in_reply_to_status_id_str\":\"1149682806483804160\",\"in_reply_to_user_id\":3387807501,\"in_reply_to_user_id_str\":\"3387807501\",\"in_reply_to_screen_name\":\"Caleb_Brentley\",\"geo\":null,\"coordinates\":null,\"place\":null,\"contributors\":null,\"is_quote_status\":false,\"retweet_count\":6,\"favorite_count\":126,\"favorited\":false,\"retweeted\":false,\"lang\":\"en\"},\"contributors_enabled\":false,\"is_translator\":false,\"is_translation_enabled\":false,\"profile_background_color\":\"ACDED6\",\"profile_background_image_url\":\"http:\\/\\/abs.twimg.com\\/images\\/themes\\/theme18\\/bg.gif\",\"profile_background_image_url_https\":\"https:\\/\\/abs.twimg.com\\/images\\/themes\\/theme18\\/bg.gif\",\"profile_background_tile\":true,\"profile_image_url\":\"http:\\/\\/pbs.twimg.com\\/profile_images\\/1111729635610382336\\/_65QFl7B_normal.png\",\"profile_image_url_https\":\"https:\\/\\/pbs.twimg.com\\/profile_images\\/1111729635610382336\\/_65QFl7B_normal.png\",\"profile_banner_url\":\"https:\\/\\/pbs.twimg.com\\/profile_banners\\/783214\\/1556918042\",\"profile_link_color\":\"1B95E0\",\"profile_sidebar_border_color\":\"FFFFFF\",\"profile_sidebar_fill_color\":\"F6F6F6\",\"profile_text_color\":\"333333\",\"profile_use_background_image\":true,\"has_extended_profile\":true,\"default_profile\":false,\"default_profile_image\":false,\"following\":false,\"follow_request_sent\":false,\"notifications\":false,\"muting\":false,\"translator_type\":\"regular\"}" - } - } - } - ] -} \ No newline at end of file diff --git a/cassettes/testcreatedestroyfriendship.yaml b/cassettes/testcreatedestroyfriendship.yaml new file mode 100644 index 0000000..cb6fce2 --- /dev/null +++ b/cassettes/testcreatedestroyfriendship.yaml @@ -0,0 +1,171 @@ +interactions: +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - python-requests/2.25.1 + method: POST + uri: https://api.twitter.com/1.1/friendships/destroy.json?id=Twitter + response: + body: + string: !!binary | + H4sIAAAAAAAAAKxW2a7bNhD9FVcvfahxLWqzbKBosyIvfSgSoAGiC4KSRhIbilRIKo5z4X/PaLPk + 5aIFWhmwzJkzCzlnhn5yeO7st7HvkWCNv6mx2tk7g8BZO5LVgOsPB24taBSYTANIeiMXKmOWK4lC + +Ar6eKhAA8pzQAvejKq/KmZ/NquKNQ1ILsvffkJIqwWqKmsbs082ycY+ZCrZfHjx8c/GvGPhR4SA + tNxyMM7+aYD3L1x+evpX5t8aJnPI6TWWpaq1D3bYBdrVyabLmZtGsOOIvsEggsucZ106n9y15z+e + Hk9XOz3n93hCVaOVhcwCHnXBhIG1Uygh1AG0oZlqpXX24Y74JIhjVGkOMj8rXDxbbtB2EsRbQry1 + g3VgnZTZrg4trN5CuvLcFQn2frgPg9UvLj4ocbeYcMG+qlZzC2e/kR+hl9ZmVBWFAZTIVoi1Y3kN + 9LuSMAlKUBQkS0WXvtUtZo8F5gWf18Yy25rZNwncyMe8mSwnLwOkO5jLxKu2T5yQFYkx6703J+6R + 7qQxCPHD3c6P4zCMSbwju13gLrh6R4t2Fr51/n//4zsyVSv66t0qafPYz/EbSMdMTF1mbFmUJcsq + ZirLyr6EmP2xTpUYF7hTTesOrORAwcummEPODfQeOVQdMQUvYmzcVuRug60fXDTeWXZFMkKQZOuZ + VJgS1jPrXCet6/oZW1Uail+TBbkPh8ODaTSXn8XAbWelQSBEqoF+yWAL70fQ4Am7YhD3KVANjThS + q+hQQToXJNq6bhxGcUxIGD+DvajRhcGV9/5Qr0/lVn/3mBZxny8E0njiYqaUzrnE2ptJhP2ewayX + VvO0tUqfAdzQLy12MZ2IPHJGgz0A2LmNh17rWm2SeaHnzdL82nQhGRrGaWXunC7TmDtwhGI+VjNp + BEP1PSmS88YI51DBBdCUZZ9Ljdl1Q0V09s6LV6/fvI6cuxhesxIWs3McnaYbinU5jM0eY3D6VlCf + 3yRONmn5UPLiHxzTnrVXo/m/+7e4nmbUpL67meYy2AUWgyF9g2C7iwIcMzhQgyD2k81LK4s62DZU + Kl0z8fB3Uzp3wtzZ2v8fLWVSYn9cX2/PBBrQGGm45jFiRMgudEPfXfgUOBPO9CAvd+GbpdbwHFKm + aYqthJEn3Nv+uYPDhZhRUfdZoLppfdb6/bPQYu/fsGYqK85pisbQX++jwaTLoWCtsLN4bIMr+eTw + 4mrmXSdeSHDKfGnBWGqg6+pRJ5XFq3D47zNPhbq1Swdzp1J7bLrRpKFsBdPO6QcAAAD//wMAU7WB + /4EJAAA= + headers: + cache-control: + - no-cache, no-store, must-revalidate, pre-check=0, post-check=0 + content-disposition: + - attachment; filename=json.json + content-encoding: + - gzip + content-length: + - '974' + content-type: + - application/json;charset=utf-8 + date: + - Fri, 12 Feb 2021 03:32:51 GMT + expires: + - Tue, 31 Mar 1981 05:00:00 GMT + last-modified: + - Fri, 12 Feb 2021 03:32:51 GMT + pragma: + - no-cache + server: + - tsa_b + set-cookie: + - personalization_id="v1_j519dt6l4YAROFlAGW65kw=="; Max-Age=63072000; Expires=Sun, + 12 Feb 2023 03:32:51 GMT; Path=/; Domain=.twitter.com; Secure; SameSite=None + - lang=en; Path=/ + - guest_id=v1%3A161310077171823967; Max-Age=63072000; Expires=Sun, 12 Feb 2023 + 03:32:51 GMT; Path=/; Domain=.twitter.com; Secure; SameSite=None + status: + - 200 OK + strict-transport-security: + - max-age=631138519 + x-access-level: + - read-write-directmessages + x-connection-hash: + - 2e1dc775aaf02f4ce7e9696aa31076ed + x-content-type-options: + - nosniff + x-frame-options: + - SAMEORIGIN + x-response-time: + - '85' + x-transaction: + - 003000d9003890bd + x-twitter-response-tags: + - BouncerCompliant + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + Cookie: + - guest_id=v1%3A161310077171823967; personalization_id="v1_j519dt6l4YAROFlAGW65kw=="; + lang=en + User-Agent: + - python-requests/2.25.1 + method: POST + uri: https://api.twitter.com/1.1/friendships/create.json?screen_name=Twitter + response: + body: + string: !!binary | + H4sIAAAAAAAAAKxW2a7bNhD9FVcvfahxLVqLZQNFmxV56UORAA0QXxC0NJLYUKRCUnGcC/97hlos + yfZFC7QyYJkzZxZyzgz95PHM222SYE3CJf6mxmpv53UCb+lJVgGuPxy5taBRYFINIOmNXKiUWa4k + CuEr6NOxBA0ozwAteN2r/iqZ/dksSlbXILksfvsJIY0WqCqtrc1uv9qv7EOq9qsPLz7+WZt3LPqI + EJCWWw7G2z118PaFy09P/8r8W81kBhm9xrKDauyD7XaBdtV+5XLmphbs1KNvMIjgMuOpS+eTv1wH + j+fH89VOL/k9nlFVa2UhtYBHnTNhYOnlSgh1BG1oqhppvV20JQEJky2qNAeZXRQ+ni03aDsIkg0h + 66WHdWBOyqyrQwOLt3BYrP0FCXdBtIvCxS8+PijxN5hwzr6qRnMLF79xEKOXxqZU5bkBlMhGiKVn + eQX0u5IwCApQFCQ7CJe+1Q1mjwXmOR/XxjLbmNE3Cf04wLyZLAYvHcQdzDzxsmkTJ2RBEsx6tx4T + XxN30hiEBNF2GyRJFCUk2ZLtNvQnXL2jRTsL35z/3//4jkzVir56t9g3WRJk+A3EMRNTlymbFmXK + spKZ0rKiLSFmf6oOSvQL3KmmlQMr2VFw3hRjyLGB3iOHyhOmsI4Z67cV+5twE4SzxrvIrkhGCJJs + OZIKU8J6ps71vvH9IGWLUkP+635C7uPx+GBqzeVn0XHbW2gQCJGqo9++s4X3PajzhF3RidsUqIZa + nKhVtKsgHQsSb3w/ieIkISRKnsHOajQzuPLeHur1qdzq7x7TJO7zhUAaD1xMldIZl1h7M4iw31MY + 9dJqfmis0hcAN/RLg11MByL3nNFgjwB2bOOu11yrDbJ1tF6P0uzadCLpGsZrZOad52mMHdhDMR+r + mTSCofqeFMl5Y4RzKOcC6IGlnwuN2bmhIpy99+LV6zevY+8uhlesgMns7EencUOxKrqx2WIMTt8S + qsubJPvVoXgoeP4PjmnL2qvR/N/9W1wPM2pQ391MPQ82w2IwpG8YbrZxiGMGB2oYJsF+9dLKvAo3 + NZVKV0w8/F0X3p0wd7b2/0c7MCmxP66vt2cCdWiM1F3zGDEmZBv5UeBPfAqcCRd6kJfb6M1Ua3gG + B6bpAVsJIw+4t+1zB4cLMaJi95mg3LS+aIP2mWix929YM5QV5zRFY2iv995g0GWQs0bYUdy3wZV8 + cDi7mrnrxJkEp8yXBoylBlxX9zqpLF6F3X+fcSpUjZ06GDuV2lPtRpOGohFMe+cfAAAA//8DAEDJ + uEGBCQAA + headers: + cache-control: + - no-cache, no-store, must-revalidate, pre-check=0, post-check=0 + content-disposition: + - attachment; filename=json.json + content-encoding: + - gzip + content-length: + - '975' + content-type: + - application/json;charset=utf-8 + date: + - Fri, 12 Feb 2021 03:32:52 GMT + expires: + - Tue, 31 Mar 1981 05:00:00 GMT + last-modified: + - Fri, 12 Feb 2021 03:32:52 GMT + pragma: + - no-cache + server: + - tsa_b + status: + - 200 OK + strict-transport-security: + - max-age=631138519 + x-access-level: + - read-write-directmessages + x-connection-hash: + - 41063a22773828a6162082e99cf91f1a + x-content-type-options: + - nosniff + x-frame-options: + - SAMEORIGIN + x-response-time: + - '92' + x-transaction: + - 0068fb3700733c03 + x-twitter-response-tags: + - BouncerCompliant + x-xss-protection: + - '0' + status: + code: 200 + message: OK +version: 1 diff --git a/tests/test_api.py b/tests/test_api.py index 2ba5c90..f9a8c49 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -154,7 +154,7 @@ class TweepyAPITests(TweepyTestCase): # destroy self.api.destroy_direct_message(sent_dm.id) - @tape.use_cassette('testcreatedestroyfriendship.json') + @tape.use_cassette('testcreatedestroyfriendship.yaml', serializer='yaml') def testcreatedestroyfriendship(self): enemy = self.api.destroy_friendship('Twitter') self.assertEqual(enemy.screen_name, 'Twitter') @@ -252,7 +252,7 @@ class TweepyAPITests(TweepyTestCase): self.api.create_favorite(145344012) self.api.destroy_favorite(145344012) - @tape.use_cassette('testcreatedestroyblock.json') + @tape.use_cassette('testcreatedestroyblock.yaml', serializer='yaml') def testcreatedestroyblock(self): self.api.create_block('twitter') self.api.destroy_block('twitter') -- 2.25.1