From: Harmon Date: Fri, 12 Feb 2021 23:46:36 +0000 (-0600) Subject: Update cassette for test using API.followers X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=d9e89036b0a694eb5779a4b8608e91472a3aa83c;p=tweepy.git Update cassette for test using API.followers --- diff --git a/cassettes/testfollowers.json b/cassettes/testfollowers.json deleted file mode 100644 index af0c3a5..0000000 --- a/cassettes/testfollowers.json +++ /dev/null @@ -1,99 +0,0 @@ -{ - "version": 1, - "interactions": [ - { - "request": { - "method": "GET", - "uri": "https://api.twitter.com/1.1/followers/list.json?id=TweepyDev", - "body": null, - "headers": { - "Host": [ - "api.twitter.com" - ] - } - }, - "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:39 GMT" - ], - "server": [ - "tsa_b" - ], - "cache-control": [ - "no-cache, no-store, must-revalidate, pre-check=0, post-check=0" - ], - "x-connection-hash": [ - "b248eddc9370d97907f3e7c0e0e4532f" - ], - "x-rate-limit-limit": [ - "15" - ], - "x-frame-options": [ - "SAMEORIGIN" - ], - "x-rate-limit-remaining": [ - "10" - ], - "pragma": [ - "no-cache" - ], - "date": [ - "Sat, 13 Jul 2019 02:27:39 GMT" - ], - "status": [ - "200 OK" - ], - "set-cookie": [ - "personalization_id=\"v1_43IDTgRkoE9bWR5x1finnQ==\"; Max-Age=63072000; Expires=Mon, 12 Jul 2021 02:27:39 GMT; Path=/; Domain=.twitter.com", - "lang=en; Path=/", - "guest_id=v1%3A156298485942290162; Max-Age=63072000; Expires=Mon, 12 Jul 2021 02:27:39 GMT; Path=/; Domain=.twitter.com" - ], - "x-access-level": [ - "read-write-directmessages" - ], - "x-twitter-response-tags": [ - "BouncerCompliant" - ], - "x-transaction": [ - "0078192b006b319c" - ], - "strict-transport-security": [ - "max-age=631138519" - ], - "content-disposition": [ - "attachment; filename=json.json" - ], - "content-length": [ - "1689" - ], - "x-response-time": [ - "153" - ], - "x-rate-limit-reset": [ - "1562984888" - ] - }, - "body": { - "string": "{\"users\":[{\"id\":145336962,\"id_str\":\"145336962\",\"name\":\"Harmon\",\"screen_name\":\"Harmon758\",\"location\":\"\",\"description\":\"\",\"url\":\"https:\\/\\/t.co\\/ADCPRGP9vt\",\"entities\":{\"url\":{\"urls\":[{\"url\":\"https:\\/\\/t.co\\/ADCPRGP9vt\",\"expanded_url\":\"https:\\/\\/twitter.com\\/Harmon758Public\",\"display_url\":\"twitter.com\\/Harmon758Public\",\"indices\":[0,23]}]},\"description\":{\"urls\":[]}},\"protected\":true,\"followers_count\":36,\"friends_count\":526,\"listed_count\":0,\"created_at\":\"Tue May 18 18:31:35 +0000 2010\",\"favourites_count\":442,\"utc_offset\":null,\"time_zone\":null,\"geo_enabled\":false,\"verified\":false,\"statuses_count\":392,\"lang\":null,\"contributors_enabled\":false,\"is_translator\":false,\"is_translation_enabled\":false,\"profile_background_color\":\"352726\",\"profile_background_image_url\":\"http:\\/\\/abs.twimg.com\\/images\\/themes\\/theme5\\/bg.gif\",\"profile_background_image_url_https\":\"https:\\/\\/abs.twimg.com\\/images\\/themes\\/theme5\\/bg.gif\",\"profile_background_tile\":false,\"profile_image_url\":\"http:\\/\\/pbs.twimg.com\\/profile_images\\/1092562086784200704\\/fjKDgB7k_normal.jpg\",\"profile_image_url_https\":\"https:\\/\\/pbs.twimg.com\\/profile_images\\/1092562086784200704\\/fjKDgB7k_normal.jpg\",\"profile_link_color\":\"1B95E0\",\"profile_sidebar_border_color\":\"829D5E\",\"profile_sidebar_fill_color\":\"99CC33\",\"profile_text_color\":\"3E4415\",\"profile_use_background_image\":true,\"has_extended_profile\":true,\"default_profile\":false,\"default_profile_image\":false,\"following\":false,\"live_following\":false,\"follow_request_sent\":false,\"notifications\":false,\"muting\":false,\"blocking\":false,\"blocked_by\":false,\"translator_type\":\"none\"}],\"next_cursor\":0,\"next_cursor_str\":\"0\",\"previous_cursor\":0,\"previous_cursor_str\":\"0\",\"total_count\":null}" - } - } - } - ] -} \ No newline at end of file diff --git a/cassettes/testfollowers.yaml b/cassettes/testfollowers.yaml new file mode 100644 index 0000000..b9fca05 --- /dev/null +++ b/cassettes/testfollowers.yaml @@ -0,0 +1,104 @@ +interactions: +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 + method: GET + uri: https://api.twitter.com/1.1/followers/list.json?screen_name=TweepyDev + response: + body: + string: !!binary | + H4sIAAAAAAAAAORXbW/bOAz+K4K/3IcLEr87NnDAsrbbbm8otgLDsAyGbCuOVlvKJDlZNvS/H2U7 + TpyXtts63HDXDWhNUhJFPSQffjMqSYQ0og/fDJoZkeUFgR0G4wF8xVIJIzI2ImNgMFwSkDwnUtIU + o6dYSM5ALlNBCItb9adGnW+0BU+xovBnZDwWnF8XazZAr9+DJiOwki5a5TlZkoIviECTbKnXEPTo + akWVImKILtdqzhlaCJ4LXJZahF5zRTIE8iqfK1QQnMFaMFqSHDMkGU6v5RC9wtdEorICnxCW6FXr + /ER7NwQnKlHA4XOlFjKajqYjNUz5dBRwO/P55EWhb0CYoooSCNO3xrz+1UTtPsu/LDDLSBZvbWvT + nKp5lYB9OR21Me1CmlG5KPC6XXKbJWUZTbVvH8yB7Xy8+XizF9jO2Y83oIIIKpJC4IxohgtJBsaM + FwVfAQrilFdMGZHjhC6IBSUs64S2HzjwllTC0o3Msr2BAW+PtQyDwHgiKJpUOTLHyLQjy49sB/1p + wg+yTVNDaIaXvBJUkW5jK7RDC55BpTGfzSQBEauKYmAoWpL4K2dkI8gJjwnDSaGdV6IC35dE0Bnd + uYxUWAGku939sWWD25jlm10aCx2WnudXFUFPSILMENlWZFqRZ3ae25aOs04Pxwtt17fc0A18Mxyb + nrObKYdaWKfI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n+3/So5Y33abqJvPNo5u6Fn92GlJD8fOIPwt2WHLmU7TwUODjv2dVJ1a2Ytplwc/ + Q/Y6dhafSIV3MARPFgJZHrKcyAkg7bepYG6e0PZM1xqb8M8OgfQGXq9QH2q3qfBv4b+BPNov1fnL + 19mzMlwT1s+Gpiz+YDJsYXuqQ/SOvV+HoNPRiiTTUfNuwG6ORvmWrnGwQVcFtllnWcHAcs2mgdyW + b7V/q9VqKHlKcTGD97w13d7WZk+05H+Safccq3Tm7M9Vlhfeb7JacClpAjcAkiYBqUtyfOj6CV/M + 333Gczw7qFH8kDOe92tnvDu2f7gZzwxtz7fNsR+MXds0A9OdjmafXpznj4Prh5/xvv+03jRmPQ69 + i2NT1t40BvXu3Ds2tfWmsTA8O3OcU9OYc+G6lnfnNNa0gePDWKP7D89i0MZYHbMKerSoS8HOd9vs + m/ciS8qhMu9Y7sl2rBVXuNiUF10rb/4BAAD//wMA87DgKzgYAAA= + 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: + - '1691' + content-type: + - application/json;charset=utf-8 + date: + - Fri, 12 Feb 2021 23:43:24 GMT + expires: + - Tue, 31 Mar 1981 05:00:00 GMT + last-modified: + - Fri, 12 Feb 2021 23:43:24 GMT + pragma: + - no-cache + server: + - tsa_b + set-cookie: + - personalization_id="v1_LvMjRAWaCJiezI8izgPZWw=="; Max-Age=63072000; Expires=Sun, + 12 Feb 2023 23:43:24 GMT; Path=/; Domain=.twitter.com; Secure; SameSite=None + - lang=en; Path=/ + - guest_id=v1%3A161317340462563794; Max-Age=63072000; Expires=Sun, 12 Feb 2023 + 23:43:24 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: + - 966f4e140e26afab3d0e11f88e7d36e4 + x-content-type-options: + - nosniff + x-frame-options: + - SAMEORIGIN + x-rate-limit-limit: + - '15' + x-rate-limit-remaining: + - '14' + x-rate-limit-reset: + - '1613174304' + x-response-time: + - '61' + x-transaction: + - 00c6f5e700d2b4ce + 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 5f819eb..115792d 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -180,7 +180,7 @@ class TweepyAPITests(TweepyTestCase): def testfriends(self): self.api.friends(screen_name=username) - @tape.use_cassette('testfollowers.json') + @tape.use_cassette('testfollowers.yaml', serializer='yaml') def testfollowers(self): self.api.followers(screen_name=username)