diff options
-rw-r--r-- | mastodon/Mastodon.py | 13 | ||||
-rw-r--r-- | tests/cassettes/test_notifications_exclude_and_types.yaml | 448 | ||||
-rw-r--r-- | tests/cassettes/test_notifications_exclude_types.yaml | 194 | ||||
-rw-r--r-- | tests/cassettes/test_notifications_mentions_only.yaml | 296 | ||||
-rw-r--r-- | tests/cassettes/test_notifications_types.yaml | 354 | ||||
-rw-r--r-- | tests/test_notifications.py | 41 |
6 files changed, 1339 insertions, 7 deletions
diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py index d98289d..f0d9cc5 100644 --- a/mastodon/Mastodon.py +++ b/mastodon/Mastodon.py | |||
@@ -1108,23 +1108,24 @@ class Mastodon: | |||
1108 | * `status` - A user that the logged in user has enabned notifications for has enabled `notify` (see `account_follow()`_) | 1108 | * `status` - A user that the logged in user has enabned notifications for has enabled `notify` (see `account_follow()`_) |
1109 | * `admin.sign_up` - For accounts with appropriate permissions (TODO: document which those are when adding the permission API): A new user has signed up | 1109 | * `admin.sign_up` - For accounts with appropriate permissions (TODO: document which those are when adding the permission API): A new user has signed up |
1110 | * `admin.report ` - For accounts with appropriate permissions (TODO: document which those are when adding the permission API): A new report has been received | 1110 | * `admin.report ` - For accounts with appropriate permissions (TODO: document which those are when adding the permission API): A new report has been received |
1111 | Parameters `exclude_types` or alternately `types` are array of these types, specifying them will in- or exclude the | 1111 | Parameters `exclude_types` and `types` are array of these types, specifying them will in- or exclude the |
1112 | types of notifications given. Specifying `mentions_only` is a deprecated way to set `exclude_types` to all but mentions. | 1112 | types of notifications given. It is legal to give both parameters at the same tine, the result will then |
1113 | be the intersection of the results of both filters. Specifying `mentions_only` is a deprecated way to set | ||
1114 | `exclude_types` to all but mentions. | ||
1113 | 1115 | ||
1114 | Can be passed an `id` to fetch a single notification. | 1116 | Can be passed an `id` to fetch a single notification. |
1115 | 1117 | ||
1116 | Returns a list of `notification dicts`_. | 1118 | Returns a list of `notification dicts`_. |
1117 | """ | 1119 | """ |
1118 | if mentions_only is not None: | 1120 | if mentions_only is not None: |
1119 | if exclude_types is not None: | 1121 | if exclude_types is None and types is None: |
1120 | if mentions_only: | 1122 | if mentions_only: |
1121 | if self.verify_minimum_version("3.5.0", cached=True): | 1123 | if self.verify_minimum_version("3.5.0", cached=True): |
1122 | types = ["mention"] | 1124 | types = ["mention"] |
1123 | else: | 1125 | else: |
1124 | exclude_types = ["follow", "favourite", | 1126 | exclude_types = ["follow", "favourite", "reblog", "poll", "follow_request"] |
1125 | "reblog", "poll", "follow_request"] | ||
1126 | else: | 1127 | else: |
1127 | raise MastodonIllegalArgumentError('Cannot specify exclude_types when mentions_only is present') | 1128 | raise MastodonIllegalArgumentError('Cannot specify exclude_types/types when mentions_only is present') |
1128 | del mentions_only | 1129 | del mentions_only |
1129 | 1130 | ||
1130 | if max_id is not None: | 1131 | if max_id is not None: |
diff --git a/tests/cassettes/test_notifications_exclude_and_types.yaml b/tests/cassettes/test_notifications_exclude_and_types.yaml new file mode 100644 index 0000000..e9a26f9 --- /dev/null +++ b/tests/cassettes/test_notifications_exclude_and_types.yaml | |||
@@ -0,0 +1,448 @@ | |||
1 | interactions: | ||
2 | - request: | ||
3 | body: status=%40mastodonpy_test+hello%21 | ||
4 | headers: | ||
5 | Accept: | ||
6 | - '*/*' | ||
7 | Accept-Encoding: | ||
8 | - gzip, deflate | ||
9 | Authorization: | ||
10 | - Bearer __MASTODON_PY_TEST_ACCESS_TOKEN_2 | ||
11 | Connection: | ||
12 | - keep-alive | ||
13 | Content-Length: | ||
14 | - '34' | ||
15 | Content-Type: | ||
16 | - application/x-www-form-urlencoded | ||
17 | User-Agent: | ||
18 | - tests/v311 | ||
19 | method: POST | ||
20 | uri: http://localhost:3000/api/v1/statuses | ||
21 | response: | ||
22 | body: | ||
23 | string: '{"id":"109395805945144995","created_at":"2022-11-23T23:52:07.240Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/admin/statuses/109395805945144995","url":"http://localhost:3000/@admin/109395805945144995","replies_count":0,"reblogs_count":0,"favourites_count":0,"edited_at":null,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"pinned":false,"content":"\u003cp\u003e\u003cspan | ||
24 | class=\"h-card\"\u003e\u003ca href=\"http://localhost:3000/@mastodonpy_test\" | ||
25 | class=\"u-url mention\"\u003e@\u003cspan\u003emastodonpy_test\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e | ||
26 | hello!\u003c/p\u003e","filtered":[],"reblog":null,"application":{"name":"Mastodon.py | ||
27 | test suite","website":null},"account":{"id":"109384259794974437","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":9,"last_status_at":"2022-11-23","noindex":false,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[{"id":"109384260022953307","username":"mastodonpy_test","url":"http://localhost:3000/@mastodonpy_test","acct":"mastodonpy_test"}],"tags":[],"emojis":[],"card":null,"poll":null}' | ||
28 | headers: | ||
29 | Cache-Control: | ||
30 | - no-store | ||
31 | Content-Security-Policy: | ||
32 | - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src | ||
33 | ''self'' http://localhost:3000; img-src ''self'' https: data: blob: http://localhost:3000; | ||
34 | style-src ''self'' http://localhost:3000 ''nonce-drqzZUD9kMaVis/d+/naWQ==''; | ||
35 | media-src ''self'' https: data: http://localhost:3000; frame-src ''self'' | ||
36 | https:; manifest-src ''self'' http://localhost:3000; connect-src ''self'' | ||
37 | data: blob: http://localhost:3000 http://localhost:3000 ws://localhost:4000 | ||
38 | ws://localhost:3035 http://localhost:3035; script-src ''self'' ''unsafe-inline'' | ||
39 | ''unsafe-eval'' http://localhost:3000; child-src ''self'' blob: http://localhost:3000; | ||
40 | worker-src ''self'' blob: http://localhost:3000' | ||
41 | Content-Type: | ||
42 | - application/json; charset=utf-8 | ||
43 | ETag: | ||
44 | - W/"ae25d4ab016995b4f779c2a1ba4a343e" | ||
45 | Referrer-Policy: | ||
46 | - strict-origin-when-cross-origin | ||
47 | Transfer-Encoding: | ||
48 | - chunked | ||
49 | Vary: | ||
50 | - Accept, Origin | ||
51 | X-Content-Type-Options: | ||
52 | - nosniff | ||
53 | X-Download-Options: | ||
54 | - noopen | ||
55 | X-Frame-Options: | ||
56 | - SAMEORIGIN | ||
57 | X-Permitted-Cross-Domain-Policies: | ||
58 | - none | ||
59 | X-RateLimit-Limit: | ||
60 | - '300' | ||
61 | X-RateLimit-Remaining: | ||
62 | - '292' | ||
63 | X-RateLimit-Reset: | ||
64 | - '2022-11-24T00:00:00.267444Z' | ||
65 | X-Request-Id: | ||
66 | - 07cd1708-036d-4915-8260-94bc3ba712d5 | ||
67 | X-Runtime: | ||
68 | - '0.042008' | ||
69 | X-XSS-Protection: | ||
70 | - 1; mode=block | ||
71 | status: | ||
72 | code: 200 | ||
73 | message: OK | ||
74 | - request: | ||
75 | body: null | ||
76 | headers: | ||
77 | Accept: | ||
78 | - '*/*' | ||
79 | Accept-Encoding: | ||
80 | - gzip, deflate | ||
81 | Authorization: | ||
82 | - Bearer __MASTODON_PY_TEST_ACCESS_TOKEN | ||
83 | Connection: | ||
84 | - keep-alive | ||
85 | User-Agent: | ||
86 | - tests/v311 | ||
87 | method: GET | ||
88 | uri: http://localhost:3000/api/v1/notifications?exclude_types%5B%5D=mention&types%5B%5D=mention | ||
89 | response: | ||
90 | body: | ||
91 | string: '[]' | ||
92 | headers: | ||
93 | Cache-Control: | ||
94 | - no-store | ||
95 | Content-Security-Policy: | ||
96 | - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src | ||
97 | ''self'' http://localhost:3000; img-src ''self'' https: data: blob: http://localhost:3000; | ||
98 | style-src ''self'' http://localhost:3000 ''nonce-L7rXTpB5G9IwBHzqTAlKkQ==''; | ||
99 | media-src ''self'' https: data: http://localhost:3000; frame-src ''self'' | ||
100 | https:; manifest-src ''self'' http://localhost:3000; connect-src ''self'' | ||
101 | data: blob: http://localhost:3000 http://localhost:3000 ws://localhost:4000 | ||
102 | ws://localhost:3035 http://localhost:3035; script-src ''self'' ''unsafe-inline'' | ||
103 | ''unsafe-eval'' http://localhost:3000; child-src ''self'' blob: http://localhost:3000; | ||
104 | worker-src ''self'' blob: http://localhost:3000' | ||
105 | Content-Type: | ||
106 | - application/json; charset=utf-8 | ||
107 | ETag: | ||
108 | - W/"4f53cda18c2baa0c0354bb5f9a3ecbe5" | ||
109 | Referrer-Policy: | ||
110 | - strict-origin-when-cross-origin | ||
111 | Transfer-Encoding: | ||
112 | - chunked | ||
113 | Vary: | ||
114 | - Accept, Origin | ||
115 | X-Content-Type-Options: | ||
116 | - nosniff | ||
117 | X-Download-Options: | ||
118 | - noopen | ||
119 | X-Frame-Options: | ||
120 | - SAMEORIGIN | ||
121 | X-Permitted-Cross-Domain-Policies: | ||
122 | - none | ||
123 | X-Request-Id: | ||
124 | - 1ac94494-b04b-45ae-a748-de34334659dd | ||
125 | X-Runtime: | ||
126 | - '0.009775' | ||
127 | X-XSS-Protection: | ||
128 | - 1; mode=block | ||
129 | status: | ||
130 | code: 200 | ||
131 | message: OK | ||
132 | - request: | ||
133 | body: null | ||
134 | headers: | ||
135 | Accept: | ||
136 | - '*/*' | ||
137 | Accept-Encoding: | ||
138 | - gzip, deflate | ||
139 | Authorization: | ||
140 | - Bearer __MASTODON_PY_TEST_ACCESS_TOKEN | ||
141 | Connection: | ||
142 | - keep-alive | ||
143 | User-Agent: | ||
144 | - tests/v311 | ||
145 | method: GET | ||
146 | uri: http://localhost:3000/api/v1/notifications?exclude_types%5B%5D=mention&types%5B%5D=follow_request | ||
147 | response: | ||
148 | body: | ||
149 | string: '[]' | ||
150 | headers: | ||
151 | Cache-Control: | ||
152 | - no-store | ||
153 | Content-Security-Policy: | ||
154 | - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src | ||
155 | ''self'' http://localhost:3000; img-src ''self'' https: data: blob: http://localhost:3000; | ||
156 | style-src ''self'' http://localhost:3000 ''nonce-Y7cvZZdQ9Bk+w3gxMFgNNA==''; | ||
157 | media-src ''self'' https: data: http://localhost:3000; frame-src ''self'' | ||
158 | https:; manifest-src ''self'' http://localhost:3000; connect-src ''self'' | ||
159 | data: blob: http://localhost:3000 http://localhost:3000 ws://localhost:4000 | ||
160 | ws://localhost:3035 http://localhost:3035; script-src ''self'' ''unsafe-inline'' | ||
161 | ''unsafe-eval'' http://localhost:3000; child-src ''self'' blob: http://localhost:3000; | ||
162 | worker-src ''self'' blob: http://localhost:3000' | ||
163 | Content-Type: | ||
164 | - application/json; charset=utf-8 | ||
165 | ETag: | ||
166 | - W/"4f53cda18c2baa0c0354bb5f9a3ecbe5" | ||
167 | Referrer-Policy: | ||
168 | - strict-origin-when-cross-origin | ||
169 | Transfer-Encoding: | ||
170 | - chunked | ||
171 | Vary: | ||
172 | - Accept, Origin | ||
173 | X-Content-Type-Options: | ||
174 | - nosniff | ||
175 | X-Download-Options: | ||
176 | - noopen | ||
177 | X-Frame-Options: | ||
178 | - SAMEORIGIN | ||
179 | X-Permitted-Cross-Domain-Policies: | ||
180 | - none | ||
181 | X-Request-Id: | ||
182 | - a50d0be0-261e-4fb2-9f5a-961e91a22ac4 | ||
183 | X-Runtime: | ||
184 | - '0.009341' | ||
185 | X-XSS-Protection: | ||
186 | - 1; mode=block | ||
187 | status: | ||
188 | code: 200 | ||
189 | message: OK | ||
190 | - request: | ||
191 | body: null | ||
192 | headers: | ||
193 | Accept: | ||
194 | - '*/*' | ||
195 | Accept-Encoding: | ||
196 | - gzip, deflate | ||
197 | Authorization: | ||
198 | - Bearer __MASTODON_PY_TEST_ACCESS_TOKEN | ||
199 | Connection: | ||
200 | - keep-alive | ||
201 | User-Agent: | ||
202 | - tests/v311 | ||
203 | method: GET | ||
204 | uri: http://localhost:3000/api/v1/notifications?exclude_types%5B%5D=follow_request&types%5B%5D=mention | ||
205 | response: | ||
206 | body: | ||
207 | string: '[{"id":"25","type":"mention","created_at":"2022-11-23T23:52:07.341Z","account":{"id":"109384259794974437","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":9,"last_status_at":"2022-11-23","noindex":false,"emojis":[],"fields":[]},"status":{"id":"109395805945144995","created_at":"2022-11-23T23:52:07.240Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/admin/statuses/109395805945144995","url":"http://localhost:3000/@admin/109395805945144995","replies_count":0,"reblogs_count":0,"favourites_count":0,"edited_at":null,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"content":"\u003cp\u003e\u003cspan | ||
208 | class=\"h-card\"\u003e\u003ca href=\"http://localhost:3000/@mastodonpy_test\" | ||
209 | class=\"u-url mention\"\u003e@\u003cspan\u003emastodonpy_test\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e | ||
210 | hello!\u003c/p\u003e","filtered":[],"reblog":null,"application":{"name":"Mastodon.py | ||
211 | test suite","website":null},"account":{"id":"109384259794974437","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":9,"last_status_at":"2022-11-23","noindex":false,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[{"id":"109384260022953307","username":"mastodonpy_test","url":"http://localhost:3000/@mastodonpy_test","acct":"mastodonpy_test"}],"tags":[],"emojis":[],"card":null,"poll":null}},{"id":"17","type":"mention","created_at":"2022-11-21T23:06:21.025Z","account":{"id":"109384260135049902","username":"mastodonpy_test_2","acct":"mastodonpy_test_2","display_name":"","locked":false,"bot":false,"discoverable":true,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@mastodonpy_test_2","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":0,"last_status_at":null,"noindex":false,"emojis":[],"fields":[]},"status":{"id":"109384301340129379","created_at":"2022-11-21T23:06:20.898Z","in_reply_to_id":"109384301270458447","in_reply_to_account_id":"109384260022953307","sensitive":false,"spoiler_text":"","visibility":"direct","language":"ja","uri":"http://localhost:3000/users/mastodonpy_test_2/statuses/109384301340129379","url":"http://localhost:3000/@mastodonpy_test_2/109384301340129379","replies_count":0,"reblogs_count":0,"favourites_count":0,"edited_at":null,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"content":"\u003cp\u003e\u003cspan | ||
212 | class=\"h-card\"\u003e\u003ca href=\"http://localhost:3000/@mastodonpy_test\" | ||
213 | class=\"u-url mention\"\u003e@\u003cspan\u003emastodonpy_test\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e | ||
214 | pssssst!\u003c/p\u003e","filtered":[],"reblog":null,"application":{"name":"Mastodon.py | ||
215 | test suite","website":null},"account":{"id":"109384260135049902","username":"mastodonpy_test_2","acct":"mastodonpy_test_2","display_name":"","locked":false,"bot":false,"discoverable":true,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@mastodonpy_test_2","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":0,"last_status_at":null,"noindex":false,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[{"id":"109384260022953307","username":"mastodonpy_test","url":"http://localhost:3000/@mastodonpy_test","acct":"mastodonpy_test"}],"tags":[],"emojis":[],"card":null,"poll":null}},{"id":"15","type":"mention","created_at":"2022-11-21T23:06:20.086Z","account":{"id":"109384259794974437","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":9,"last_status_at":"2022-11-23","noindex":false,"emojis":[],"fields":[]},"status":{"id":"109384301260589758","created_at":"2022-11-21T23:06:19.685Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/admin/statuses/109384301260589758","url":"http://localhost:3000/@admin/109384301260589758","replies_count":0,"reblogs_count":0,"favourites_count":0,"edited_at":null,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"content":"\u003cp\u003e\u003cspan | ||
216 | class=\"h-card\"\u003e\u003ca href=\"http://localhost:3000/@mastodonpy_test\" | ||
217 | class=\"u-url mention\"\u003e@\u003cspan\u003emastodonpy_test\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e | ||
218 | beep beep I\u0026#39;m a jeep\u003c/p\u003e","filtered":[],"reblog":null,"application":{"name":"Mastodon.py | ||
219 | test suite","website":null},"account":{"id":"109384259794974437","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":9,"last_status_at":"2022-11-23","noindex":false,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[{"id":"109384260022953307","username":"mastodonpy_test","url":"http://localhost:3000/@mastodonpy_test","acct":"mastodonpy_test"}],"tags":[],"emojis":[],"card":null,"poll":null}},{"id":"14","type":"mention","created_at":"2022-11-21T23:01:30.098Z","account":{"id":"109384260135049902","username":"mastodonpy_test_2","acct":"mastodonpy_test_2","display_name":"","locked":false,"bot":false,"discoverable":true,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@mastodonpy_test_2","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":0,"last_status_at":null,"noindex":false,"emojis":[],"fields":[]},"status":{"id":"109384282227323431","created_at":"2022-11-21T23:01:29.260Z","in_reply_to_id":"109384282224216103","in_reply_to_account_id":"109384260022953307","sensitive":false,"spoiler_text":"","visibility":"direct","language":"ja","uri":"http://localhost:3000/users/mastodonpy_test_2/statuses/109384282227323431","url":"http://localhost:3000/@mastodonpy_test_2/109384282227323431","replies_count":0,"reblogs_count":0,"favourites_count":0,"edited_at":null,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"content":"\u003cp\u003e\u003cspan | ||
220 | class=\"h-card\"\u003e\u003ca href=\"http://localhost:3000/@mastodonpy_test\" | ||
221 | class=\"u-url mention\"\u003e@\u003cspan\u003emastodonpy_test\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e | ||
222 | pssssst!\u003c/p\u003e","filtered":[],"reblog":null,"application":{"name":"Mastodon.py | ||
223 | test suite","website":null},"account":{"id":"109384260135049902","username":"mastodonpy_test_2","acct":"mastodonpy_test_2","display_name":"","locked":false,"bot":false,"discoverable":true,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@mastodonpy_test_2","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":0,"last_status_at":null,"noindex":false,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[{"id":"109384260022953307","username":"mastodonpy_test","url":"http://localhost:3000/@mastodonpy_test","acct":"mastodonpy_test"}],"tags":[],"emojis":[],"card":null,"poll":null}},{"id":"12","type":"mention","created_at":"2022-11-21T23:01:29.815Z","account":{"id":"109384259794974437","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":9,"last_status_at":"2022-11-23","noindex":false,"emojis":[],"fields":[]},"status":{"id":"109384282218092087","created_at":"2022-11-21T23:01:29.120Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/admin/statuses/109384282218092087","url":"http://localhost:3000/@admin/109384282218092087","replies_count":0,"reblogs_count":0,"favourites_count":0,"edited_at":"2022-11-21T23:01:31.316Z","favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"content":"\u003cp\u003e\u003cspan | ||
224 | class=\"h-card\"\u003e\u003ca href=\"http://localhost:3000/@mastodonpy_test\" | ||
225 | class=\"u-url mention\"\u003e@\u003cspan\u003emastodonpy_test\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e | ||
226 | beep beep I\u0026#39;m a giraffe\u003c/p\u003e","filtered":[],"reblog":null,"application":{"name":"Mastodon.py | ||
227 | test suite","website":null},"account":{"id":"109384259794974437","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":9,"last_status_at":"2022-11-23","noindex":false,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[{"id":"109384260022953307","username":"mastodonpy_test","url":"http://localhost:3000/@mastodonpy_test","acct":"mastodonpy_test"}],"tags":[],"emojis":[],"card":null,"poll":null}},{"id":"11","type":"mention","created_at":"2022-11-21T22:58:20.111Z","account":{"id":"109384260135049902","username":"mastodonpy_test_2","acct":"mastodonpy_test_2","display_name":"","locked":false,"bot":false,"discoverable":true,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@mastodonpy_test_2","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":0,"last_status_at":null,"noindex":false,"emojis":[],"fields":[]},"status":{"id":"109384269774042068","created_at":"2022-11-21T22:58:19.239Z","in_reply_to_id":"109384269771231130","in_reply_to_account_id":"109384260022953307","sensitive":false,"spoiler_text":"","visibility":"direct","language":"ja","uri":"http://localhost:3000/users/mastodonpy_test_2/statuses/109384269774042068","url":"http://localhost:3000/@mastodonpy_test_2/109384269774042068","replies_count":0,"reblogs_count":0,"favourites_count":0,"edited_at":null,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"content":"\u003cp\u003e\u003cspan | ||
228 | class=\"h-card\"\u003e\u003ca href=\"http://localhost:3000/@mastodonpy_test\" | ||
229 | class=\"u-url mention\"\u003e@\u003cspan\u003emastodonpy_test\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e | ||
230 | pssssst!\u003c/p\u003e","filtered":[],"reblog":null,"application":{"name":"Mastodon.py | ||
231 | test suite","website":null},"account":{"id":"109384260135049902","username":"mastodonpy_test_2","acct":"mastodonpy_test_2","display_name":"","locked":false,"bot":false,"discoverable":true,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@mastodonpy_test_2","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":0,"last_status_at":null,"noindex":false,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[{"id":"109384260022953307","username":"mastodonpy_test","url":"http://localhost:3000/@mastodonpy_test","acct":"mastodonpy_test"}],"tags":[],"emojis":[],"card":null,"poll":null}},{"id":"9","type":"mention","created_at":"2022-11-21T22:58:19.933Z","account":{"id":"109384259794974437","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":9,"last_status_at":"2022-11-23","noindex":false,"emojis":[],"fields":[]},"status":{"id":"109384269765215700","created_at":"2022-11-21T22:58:19.105Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/admin/statuses/109384269765215700","url":"http://localhost:3000/@admin/109384269765215700","replies_count":0,"reblogs_count":0,"favourites_count":0,"edited_at":"2022-11-21T22:58:24.292Z","favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"content":"\u003cp\u003e\u003cspan | ||
232 | class=\"h-card\"\u003e\u003ca href=\"http://localhost:3000/@mastodonpy_test\" | ||
233 | class=\"u-url mention\"\u003e@\u003cspan\u003emastodonpy_test\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e | ||
234 | beep beep I\u0026#39;m a giraffe\u003c/p\u003e","filtered":[],"reblog":null,"application":{"name":"Mastodon.py | ||
235 | test suite","website":null},"account":{"id":"109384259794974437","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":9,"last_status_at":"2022-11-23","noindex":false,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[{"id":"109384260022953307","username":"mastodonpy_test","url":"http://localhost:3000/@mastodonpy_test","acct":"mastodonpy_test"}],"tags":[],"emojis":[],"card":null,"poll":null}},{"id":"8","type":"mention","created_at":"2022-11-21T22:56:17.313Z","account":{"id":"109384260135049902","username":"mastodonpy_test_2","acct":"mastodonpy_test_2","display_name":"","locked":false,"bot":false,"discoverable":true,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@mastodonpy_test_2","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":0,"last_status_at":null,"noindex":false,"emojis":[],"fields":[]},"status":{"id":"109384261733170175","created_at":"2022-11-21T22:56:16.544Z","in_reply_to_id":"109384261729433703","in_reply_to_account_id":"109384260022953307","sensitive":false,"spoiler_text":"","visibility":"direct","language":"ja","uri":"http://localhost:3000/users/mastodonpy_test_2/statuses/109384261733170175","url":"http://localhost:3000/@mastodonpy_test_2/109384261733170175","replies_count":0,"reblogs_count":0,"favourites_count":0,"edited_at":null,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"content":"\u003cp\u003e\u003cspan | ||
236 | class=\"h-card\"\u003e\u003ca href=\"http://localhost:3000/@mastodonpy_test\" | ||
237 | class=\"u-url mention\"\u003e@\u003cspan\u003emastodonpy_test\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e | ||
238 | pssssst!\u003c/p\u003e","filtered":[],"reblog":null,"application":{"name":"Mastodon.py | ||
239 | test suite","website":null},"account":{"id":"109384260135049902","username":"mastodonpy_test_2","acct":"mastodonpy_test_2","display_name":"","locked":false,"bot":false,"discoverable":true,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@mastodonpy_test_2","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":0,"last_status_at":null,"noindex":false,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[{"id":"109384260022953307","username":"mastodonpy_test","url":"http://localhost:3000/@mastodonpy_test","acct":"mastodonpy_test"}],"tags":[],"emojis":[],"card":null,"poll":null}},{"id":"6","type":"mention","created_at":"2022-11-21T22:56:17.126Z","account":{"id":"109384259794974437","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":9,"last_status_at":"2022-11-23","noindex":false,"emojis":[],"fields":[]},"status":{"id":"109384261718850765","created_at":"2022-11-21T22:56:16.349Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/admin/statuses/109384261718850765","url":"http://localhost:3000/@admin/109384261718850765","replies_count":0,"reblogs_count":0,"favourites_count":0,"edited_at":"2022-11-21T22:56:21.618Z","favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"content":"\u003cp\u003e\u003cspan | ||
240 | class=\"h-card\"\u003e\u003ca href=\"http://localhost:3000/@mastodonpy_test\" | ||
241 | class=\"u-url mention\"\u003e@\u003cspan\u003emastodonpy_test\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e | ||
242 | beep beep I\u0026#39;m a giraffe\u003c/p\u003e","filtered":[],"reblog":null,"application":{"name":"Mastodon.py | ||
243 | test suite","website":null},"account":{"id":"109384259794974437","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":9,"last_status_at":"2022-11-23","noindex":false,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[{"id":"109384260022953307","username":"mastodonpy_test","url":"http://localhost:3000/@mastodonpy_test","acct":"mastodonpy_test"}],"tags":[],"emojis":[],"card":null,"poll":null}}]' | ||
244 | headers: | ||
245 | Cache-Control: | ||
246 | - no-store | ||
247 | Content-Security-Policy: | ||
248 | - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src | ||
249 | ''self'' http://localhost:3000; img-src ''self'' https: data: blob: http://localhost:3000; | ||
250 | style-src ''self'' http://localhost:3000 ''nonce-2GKxdwUziTE8rEPC17hUhA==''; | ||
251 | media-src ''self'' https: data: http://localhost:3000; frame-src ''self'' | ||
252 | https:; manifest-src ''self'' http://localhost:3000; connect-src ''self'' | ||
253 | data: blob: http://localhost:3000 http://localhost:3000 ws://localhost:4000 | ||
254 | ws://localhost:3035 http://localhost:3035; script-src ''self'' ''unsafe-inline'' | ||
255 | ''unsafe-eval'' http://localhost:3000; child-src ''self'' blob: http://localhost:3000; | ||
256 | worker-src ''self'' blob: http://localhost:3000' | ||
257 | Content-Type: | ||
258 | - application/json; charset=utf-8 | ||
259 | ETag: | ||
260 | - W/"2756c78b499be65331413dafb002fcf3" | ||
261 | Link: | ||
262 | - <http://localhost:3000/api/v1/notifications?exclude_types%5B%5D=follow_request&max_id=6&types%5B%5D=mention>; | ||
263 | rel="next", <http://localhost:3000/api/v1/notifications?exclude_types%5B%5D=follow_request&min_id=25&types%5B%5D=mention>; | ||
264 | rel="prev" | ||
265 | Referrer-Policy: | ||
266 | - strict-origin-when-cross-origin | ||
267 | Transfer-Encoding: | ||
268 | - chunked | ||
269 | Vary: | ||
270 | - Accept, Origin | ||
271 | X-Content-Type-Options: | ||
272 | - nosniff | ||
273 | X-Download-Options: | ||
274 | - noopen | ||
275 | X-Frame-Options: | ||
276 | - SAMEORIGIN | ||
277 | X-Permitted-Cross-Domain-Policies: | ||
278 | - none | ||
279 | X-Request-Id: | ||
280 | - e953ce27-becd-48de-988c-9d1faeeffbac | ||
281 | X-Runtime: | ||
282 | - '0.078025' | ||
283 | X-XSS-Protection: | ||
284 | - 1; mode=block | ||
285 | status: | ||
286 | code: 200 | ||
287 | message: OK | ||
288 | - request: | ||
289 | body: null | ||
290 | headers: | ||
291 | Accept: | ||
292 | - '*/*' | ||
293 | Accept-Encoding: | ||
294 | - gzip, deflate | ||
295 | Authorization: | ||
296 | - Bearer __MASTODON_PY_TEST_ACCESS_TOKEN | ||
297 | Connection: | ||
298 | - keep-alive | ||
299 | User-Agent: | ||
300 | - tests/v311 | ||
301 | method: GET | ||
302 | uri: http://localhost:3000/api/v1/notifications?exclude_types%5B%5D=follow_request&types%5B%5D=mention&types%5B%5D=follow_request | ||
303 | response: | ||
304 | body: | ||
305 | string: '[{"id":"25","type":"mention","created_at":"2022-11-23T23:52:07.341Z","account":{"id":"109384259794974437","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":9,"last_status_at":"2022-11-23","noindex":false,"emojis":[],"fields":[]},"status":{"id":"109395805945144995","created_at":"2022-11-23T23:52:07.240Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/admin/statuses/109395805945144995","url":"http://localhost:3000/@admin/109395805945144995","replies_count":0,"reblogs_count":0,"favourites_count":0,"edited_at":null,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"content":"\u003cp\u003e\u003cspan | ||
306 | class=\"h-card\"\u003e\u003ca href=\"http://localhost:3000/@mastodonpy_test\" | ||
307 | class=\"u-url mention\"\u003e@\u003cspan\u003emastodonpy_test\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e | ||
308 | hello!\u003c/p\u003e","filtered":[],"reblog":null,"application":{"name":"Mastodon.py | ||
309 | test suite","website":null},"account":{"id":"109384259794974437","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":9,"last_status_at":"2022-11-23","noindex":false,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[{"id":"109384260022953307","username":"mastodonpy_test","url":"http://localhost:3000/@mastodonpy_test","acct":"mastodonpy_test"}],"tags":[],"emojis":[],"card":null,"poll":null}},{"id":"17","type":"mention","created_at":"2022-11-21T23:06:21.025Z","account":{"id":"109384260135049902","username":"mastodonpy_test_2","acct":"mastodonpy_test_2","display_name":"","locked":false,"bot":false,"discoverable":true,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@mastodonpy_test_2","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":0,"last_status_at":null,"noindex":false,"emojis":[],"fields":[]},"status":{"id":"109384301340129379","created_at":"2022-11-21T23:06:20.898Z","in_reply_to_id":"109384301270458447","in_reply_to_account_id":"109384260022953307","sensitive":false,"spoiler_text":"","visibility":"direct","language":"ja","uri":"http://localhost:3000/users/mastodonpy_test_2/statuses/109384301340129379","url":"http://localhost:3000/@mastodonpy_test_2/109384301340129379","replies_count":0,"reblogs_count":0,"favourites_count":0,"edited_at":null,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"content":"\u003cp\u003e\u003cspan | ||
310 | class=\"h-card\"\u003e\u003ca href=\"http://localhost:3000/@mastodonpy_test\" | ||
311 | class=\"u-url mention\"\u003e@\u003cspan\u003emastodonpy_test\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e | ||
312 | pssssst!\u003c/p\u003e","filtered":[],"reblog":null,"application":{"name":"Mastodon.py | ||
313 | test suite","website":null},"account":{"id":"109384260135049902","username":"mastodonpy_test_2","acct":"mastodonpy_test_2","display_name":"","locked":false,"bot":false,"discoverable":true,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@mastodonpy_test_2","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":0,"last_status_at":null,"noindex":false,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[{"id":"109384260022953307","username":"mastodonpy_test","url":"http://localhost:3000/@mastodonpy_test","acct":"mastodonpy_test"}],"tags":[],"emojis":[],"card":null,"poll":null}},{"id":"15","type":"mention","created_at":"2022-11-21T23:06:20.086Z","account":{"id":"109384259794974437","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":9,"last_status_at":"2022-11-23","noindex":false,"emojis":[],"fields":[]},"status":{"id":"109384301260589758","created_at":"2022-11-21T23:06:19.685Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/admin/statuses/109384301260589758","url":"http://localhost:3000/@admin/109384301260589758","replies_count":0,"reblogs_count":0,"favourites_count":0,"edited_at":null,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"content":"\u003cp\u003e\u003cspan | ||
314 | class=\"h-card\"\u003e\u003ca href=\"http://localhost:3000/@mastodonpy_test\" | ||
315 | class=\"u-url mention\"\u003e@\u003cspan\u003emastodonpy_test\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e | ||
316 | beep beep I\u0026#39;m a jeep\u003c/p\u003e","filtered":[],"reblog":null,"application":{"name":"Mastodon.py | ||
317 | test suite","website":null},"account":{"id":"109384259794974437","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":9,"last_status_at":"2022-11-23","noindex":false,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[{"id":"109384260022953307","username":"mastodonpy_test","url":"http://localhost:3000/@mastodonpy_test","acct":"mastodonpy_test"}],"tags":[],"emojis":[],"card":null,"poll":null}},{"id":"14","type":"mention","created_at":"2022-11-21T23:01:30.098Z","account":{"id":"109384260135049902","username":"mastodonpy_test_2","acct":"mastodonpy_test_2","display_name":"","locked":false,"bot":false,"discoverable":true,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@mastodonpy_test_2","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":0,"last_status_at":null,"noindex":false,"emojis":[],"fields":[]},"status":{"id":"109384282227323431","created_at":"2022-11-21T23:01:29.260Z","in_reply_to_id":"109384282224216103","in_reply_to_account_id":"109384260022953307","sensitive":false,"spoiler_text":"","visibility":"direct","language":"ja","uri":"http://localhost:3000/users/mastodonpy_test_2/statuses/109384282227323431","url":"http://localhost:3000/@mastodonpy_test_2/109384282227323431","replies_count":0,"reblogs_count":0,"favourites_count":0,"edited_at":null,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"content":"\u003cp\u003e\u003cspan | ||
318 | class=\"h-card\"\u003e\u003ca href=\"http://localhost:3000/@mastodonpy_test\" | ||
319 | class=\"u-url mention\"\u003e@\u003cspan\u003emastodonpy_test\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e | ||
320 | pssssst!\u003c/p\u003e","filtered":[],"reblog":null,"application":{"name":"Mastodon.py | ||
321 | test suite","website":null},"account":{"id":"109384260135049902","username":"mastodonpy_test_2","acct":"mastodonpy_test_2","display_name":"","locked":false,"bot":false,"discoverable":true,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@mastodonpy_test_2","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":0,"last_status_at":null,"noindex":false,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[{"id":"109384260022953307","username":"mastodonpy_test","url":"http://localhost:3000/@mastodonpy_test","acct":"mastodonpy_test"}],"tags":[],"emojis":[],"card":null,"poll":null}},{"id":"12","type":"mention","created_at":"2022-11-21T23:01:29.815Z","account":{"id":"109384259794974437","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":9,"last_status_at":"2022-11-23","noindex":false,"emojis":[],"fields":[]},"status":{"id":"109384282218092087","created_at":"2022-11-21T23:01:29.120Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/admin/statuses/109384282218092087","url":"http://localhost:3000/@admin/109384282218092087","replies_count":0,"reblogs_count":0,"favourites_count":0,"edited_at":"2022-11-21T23:01:31.316Z","favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"content":"\u003cp\u003e\u003cspan | ||
322 | class=\"h-card\"\u003e\u003ca href=\"http://localhost:3000/@mastodonpy_test\" | ||
323 | class=\"u-url mention\"\u003e@\u003cspan\u003emastodonpy_test\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e | ||
324 | beep beep I\u0026#39;m a giraffe\u003c/p\u003e","filtered":[],"reblog":null,"application":{"name":"Mastodon.py | ||
325 | test suite","website":null},"account":{"id":"109384259794974437","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":9,"last_status_at":"2022-11-23","noindex":false,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[{"id":"109384260022953307","username":"mastodonpy_test","url":"http://localhost:3000/@mastodonpy_test","acct":"mastodonpy_test"}],"tags":[],"emojis":[],"card":null,"poll":null}},{"id":"11","type":"mention","created_at":"2022-11-21T22:58:20.111Z","account":{"id":"109384260135049902","username":"mastodonpy_test_2","acct":"mastodonpy_test_2","display_name":"","locked":false,"bot":false,"discoverable":true,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@mastodonpy_test_2","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":0,"last_status_at":null,"noindex":false,"emojis":[],"fields":[]},"status":{"id":"109384269774042068","created_at":"2022-11-21T22:58:19.239Z","in_reply_to_id":"109384269771231130","in_reply_to_account_id":"109384260022953307","sensitive":false,"spoiler_text":"","visibility":"direct","language":"ja","uri":"http://localhost:3000/users/mastodonpy_test_2/statuses/109384269774042068","url":"http://localhost:3000/@mastodonpy_test_2/109384269774042068","replies_count":0,"reblogs_count":0,"favourites_count":0,"edited_at":null,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"content":"\u003cp\u003e\u003cspan | ||
326 | class=\"h-card\"\u003e\u003ca href=\"http://localhost:3000/@mastodonpy_test\" | ||
327 | class=\"u-url mention\"\u003e@\u003cspan\u003emastodonpy_test\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e | ||
328 | pssssst!\u003c/p\u003e","filtered":[],"reblog":null,"application":{"name":"Mastodon.py | ||
329 | test suite","website":null},"account":{"id":"109384260135049902","username":"mastodonpy_test_2","acct":"mastodonpy_test_2","display_name":"","locked":false,"bot":false,"discoverable":true,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@mastodonpy_test_2","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":0,"last_status_at":null,"noindex":false,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[{"id":"109384260022953307","username":"mastodonpy_test","url":"http://localhost:3000/@mastodonpy_test","acct":"mastodonpy_test"}],"tags":[],"emojis":[],"card":null,"poll":null}},{"id":"9","type":"mention","created_at":"2022-11-21T22:58:19.933Z","account":{"id":"109384259794974437","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":9,"last_status_at":"2022-11-23","noindex":false,"emojis":[],"fields":[]},"status":{"id":"109384269765215700","created_at":"2022-11-21T22:58:19.105Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/admin/statuses/109384269765215700","url":"http://localhost:3000/@admin/109384269765215700","replies_count":0,"reblogs_count":0,"favourites_count":0,"edited_at":"2022-11-21T22:58:24.292Z","favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"content":"\u003cp\u003e\u003cspan | ||
330 | class=\"h-card\"\u003e\u003ca href=\"http://localhost:3000/@mastodonpy_test\" | ||
331 | class=\"u-url mention\"\u003e@\u003cspan\u003emastodonpy_test\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e | ||
332 | beep beep I\u0026#39;m a giraffe\u003c/p\u003e","filtered":[],"reblog":null,"application":{"name":"Mastodon.py | ||
333 | test suite","website":null},"account":{"id":"109384259794974437","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":9,"last_status_at":"2022-11-23","noindex":false,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[{"id":"109384260022953307","username":"mastodonpy_test","url":"http://localhost:3000/@mastodonpy_test","acct":"mastodonpy_test"}],"tags":[],"emojis":[],"card":null,"poll":null}},{"id":"8","type":"mention","created_at":"2022-11-21T22:56:17.313Z","account":{"id":"109384260135049902","username":"mastodonpy_test_2","acct":"mastodonpy_test_2","display_name":"","locked":false,"bot":false,"discoverable":true,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@mastodonpy_test_2","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":0,"last_status_at":null,"noindex":false,"emojis":[],"fields":[]},"status":{"id":"109384261733170175","created_at":"2022-11-21T22:56:16.544Z","in_reply_to_id":"109384261729433703","in_reply_to_account_id":"109384260022953307","sensitive":false,"spoiler_text":"","visibility":"direct","language":"ja","uri":"http://localhost:3000/users/mastodonpy_test_2/statuses/109384261733170175","url":"http://localhost:3000/@mastodonpy_test_2/109384261733170175","replies_count":0,"reblogs_count":0,"favourites_count":0,"edited_at":null,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"content":"\u003cp\u003e\u003cspan | ||
334 | class=\"h-card\"\u003e\u003ca href=\"http://localhost:3000/@mastodonpy_test\" | ||
335 | class=\"u-url mention\"\u003e@\u003cspan\u003emastodonpy_test\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e | ||
336 | pssssst!\u003c/p\u003e","filtered":[],"reblog":null,"application":{"name":"Mastodon.py | ||
337 | test suite","website":null},"account":{"id":"109384260135049902","username":"mastodonpy_test_2","acct":"mastodonpy_test_2","display_name":"","locked":false,"bot":false,"discoverable":true,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@mastodonpy_test_2","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":0,"last_status_at":null,"noindex":false,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[{"id":"109384260022953307","username":"mastodonpy_test","url":"http://localhost:3000/@mastodonpy_test","acct":"mastodonpy_test"}],"tags":[],"emojis":[],"card":null,"poll":null}},{"id":"6","type":"mention","created_at":"2022-11-21T22:56:17.126Z","account":{"id":"109384259794974437","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":9,"last_status_at":"2022-11-23","noindex":false,"emojis":[],"fields":[]},"status":{"id":"109384261718850765","created_at":"2022-11-21T22:56:16.349Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/admin/statuses/109384261718850765","url":"http://localhost:3000/@admin/109384261718850765","replies_count":0,"reblogs_count":0,"favourites_count":0,"edited_at":"2022-11-21T22:56:21.618Z","favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"content":"\u003cp\u003e\u003cspan | ||
338 | class=\"h-card\"\u003e\u003ca href=\"http://localhost:3000/@mastodonpy_test\" | ||
339 | class=\"u-url mention\"\u003e@\u003cspan\u003emastodonpy_test\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e | ||
340 | beep beep I\u0026#39;m a giraffe\u003c/p\u003e","filtered":[],"reblog":null,"application":{"name":"Mastodon.py | ||
341 | test suite","website":null},"account":{"id":"109384259794974437","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":9,"last_status_at":"2022-11-23","noindex":false,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[{"id":"109384260022953307","username":"mastodonpy_test","url":"http://localhost:3000/@mastodonpy_test","acct":"mastodonpy_test"}],"tags":[],"emojis":[],"card":null,"poll":null}}]' | ||
342 | headers: | ||
343 | Cache-Control: | ||
344 | - no-store | ||
345 | Content-Security-Policy: | ||
346 | - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src | ||
347 | ''self'' http://localhost:3000; img-src ''self'' https: data: blob: http://localhost:3000; | ||
348 | style-src ''self'' http://localhost:3000 ''nonce-RRBjwl3LzYo4DbNnF9ewXg==''; | ||
349 | media-src ''self'' https: data: http://localhost:3000; frame-src ''self'' | ||
350 | https:; manifest-src ''self'' http://localhost:3000; connect-src ''self'' | ||
351 | data: blob: http://localhost:3000 http://localhost:3000 ws://localhost:4000 | ||
352 | ws://localhost:3035 http://localhost:3035; script-src ''self'' ''unsafe-inline'' | ||
353 | ''unsafe-eval'' http://localhost:3000; child-src ''self'' blob: http://localhost:3000; | ||
354 | worker-src ''self'' blob: http://localhost:3000' | ||
355 | Content-Type: | ||
356 | - application/json; charset=utf-8 | ||
357 | ETag: | ||
358 | - W/"2756c78b499be65331413dafb002fcf3" | ||
359 | Link: | ||
360 | - <http://localhost:3000/api/v1/notifications?exclude_types%5B%5D=follow_request&max_id=6&types%5B%5D=mention&types%5B%5D=follow_request>; | ||
361 | rel="next", <http://localhost:3000/api/v1/notifications?exclude_types%5B%5D=follow_request&min_id=25&types%5B%5D=mention&types%5B%5D=follow_request>; | ||
362 | rel="prev" | ||
363 | Referrer-Policy: | ||
364 | - strict-origin-when-cross-origin | ||
365 | Transfer-Encoding: | ||
366 | - chunked | ||
367 | Vary: | ||
368 | - Accept, Origin | ||
369 | X-Content-Type-Options: | ||
370 | - nosniff | ||
371 | X-Download-Options: | ||
372 | - noopen | ||
373 | X-Frame-Options: | ||
374 | - SAMEORIGIN | ||
375 | X-Permitted-Cross-Domain-Policies: | ||
376 | - none | ||
377 | X-Request-Id: | ||
378 | - edceaf55-bc48-4138-a779-f6b3aabf2d5f | ||
379 | X-Runtime: | ||
380 | - '0.070648' | ||
381 | X-XSS-Protection: | ||
382 | - 1; mode=block | ||
383 | status: | ||
384 | code: 200 | ||
385 | message: OK | ||
386 | - request: | ||
387 | body: null | ||
388 | headers: | ||
389 | Accept: | ||
390 | - '*/*' | ||
391 | Accept-Encoding: | ||
392 | - gzip, deflate | ||
393 | Authorization: | ||
394 | - Bearer __MASTODON_PY_TEST_ACCESS_TOKEN_2 | ||
395 | Connection: | ||
396 | - keep-alive | ||
397 | Content-Length: | ||
398 | - '0' | ||
399 | User-Agent: | ||
400 | - tests/v311 | ||
401 | method: DELETE | ||
402 | uri: http://localhost:3000/api/v1/statuses/109395805945144995 | ||
403 | response: | ||
404 | body: | ||
405 | string: '{"id":"109395805945144995","created_at":"2022-11-23T23:52:07.240Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/admin/statuses/109395805945144995","url":"http://localhost:3000/@admin/109395805945144995","replies_count":0,"reblogs_count":0,"favourites_count":0,"edited_at":null,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"pinned":false,"text":"@mastodonpy_test | ||
406 | hello!","filtered":[],"reblog":null,"application":{"name":"Mastodon.py test | ||
407 | suite","website":null},"account":{"id":"109384259794974437","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":8,"last_status_at":"2022-11-23","noindex":false,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[{"id":"109384260022953307","username":"mastodonpy_test","url":"http://localhost:3000/@mastodonpy_test","acct":"mastodonpy_test"}],"tags":[],"emojis":[],"card":null,"poll":null}' | ||
408 | headers: | ||
409 | Cache-Control: | ||
410 | - no-store | ||
411 | Content-Security-Policy: | ||
412 | - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src | ||
413 | ''self'' http://localhost:3000; img-src ''self'' https: data: blob: http://localhost:3000; | ||
414 | style-src ''self'' http://localhost:3000 ''nonce-lMImYwqewus2duDwOY38KA==''; | ||
415 | media-src ''self'' https: data: http://localhost:3000; frame-src ''self'' | ||
416 | https:; manifest-src ''self'' http://localhost:3000; connect-src ''self'' | ||
417 | data: blob: http://localhost:3000 http://localhost:3000 ws://localhost:4000 | ||
418 | ws://localhost:3035 http://localhost:3035; script-src ''self'' ''unsafe-inline'' | ||
419 | ''unsafe-eval'' http://localhost:3000; child-src ''self'' blob: http://localhost:3000; | ||
420 | worker-src ''self'' blob: http://localhost:3000' | ||
421 | Content-Type: | ||
422 | - application/json; charset=utf-8 | ||
423 | ETag: | ||
424 | - W/"24dc2a18cd0f3246f927e3080425cb87" | ||
425 | Referrer-Policy: | ||
426 | - strict-origin-when-cross-origin | ||
427 | Transfer-Encoding: | ||
428 | - chunked | ||
429 | Vary: | ||
430 | - Accept, Origin | ||
431 | X-Content-Type-Options: | ||
432 | - nosniff | ||
433 | X-Download-Options: | ||
434 | - noopen | ||
435 | X-Frame-Options: | ||
436 | - SAMEORIGIN | ||
437 | X-Permitted-Cross-Domain-Policies: | ||
438 | - none | ||
439 | X-Request-Id: | ||
440 | - 0f0022aa-6b2d-458e-8a54-52060dcfa648 | ||
441 | X-Runtime: | ||
442 | - '0.039957' | ||
443 | X-XSS-Protection: | ||
444 | - 1; mode=block | ||
445 | status: | ||
446 | code: 200 | ||
447 | message: OK | ||
448 | version: 1 | ||
diff --git a/tests/cassettes/test_notifications_exclude_types.yaml b/tests/cassettes/test_notifications_exclude_types.yaml new file mode 100644 index 0000000..191681d --- /dev/null +++ b/tests/cassettes/test_notifications_exclude_types.yaml | |||
@@ -0,0 +1,194 @@ | |||
1 | interactions: | ||
2 | - request: | ||
3 | body: status=%40mastodonpy_test+hello%21 | ||
4 | headers: | ||
5 | Accept: | ||
6 | - '*/*' | ||
7 | Accept-Encoding: | ||
8 | - gzip, deflate | ||
9 | Authorization: | ||
10 | - Bearer __MASTODON_PY_TEST_ACCESS_TOKEN_2 | ||
11 | Connection: | ||
12 | - keep-alive | ||
13 | Content-Length: | ||
14 | - '34' | ||
15 | Content-Type: | ||
16 | - application/x-www-form-urlencoded | ||
17 | User-Agent: | ||
18 | - tests/v311 | ||
19 | method: POST | ||
20 | uri: http://localhost:3000/api/v1/statuses | ||
21 | response: | ||
22 | body: | ||
23 | string: '{"id":"109395782710280813","created_at":"2022-11-23T23:46:12.705Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/admin/statuses/109395782710280813","url":"http://localhost:3000/@admin/109395782710280813","replies_count":0,"reblogs_count":0,"favourites_count":0,"edited_at":null,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"pinned":false,"content":"\u003cp\u003e\u003cspan | ||
24 | class=\"h-card\"\u003e\u003ca href=\"http://localhost:3000/@mastodonpy_test\" | ||
25 | class=\"u-url mention\"\u003e@\u003cspan\u003emastodonpy_test\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e | ||
26 | hello!\u003c/p\u003e","filtered":[],"reblog":null,"application":{"name":"Mastodon.py | ||
27 | test suite","website":null},"account":{"id":"109384259794974437","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":9,"last_status_at":"2022-11-23","noindex":false,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[{"id":"109384260022953307","username":"mastodonpy_test","url":"http://localhost:3000/@mastodonpy_test","acct":"mastodonpy_test"}],"tags":[],"emojis":[],"card":null,"poll":null}' | ||
28 | headers: | ||
29 | Cache-Control: | ||
30 | - no-store | ||
31 | Content-Security-Policy: | ||
32 | - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src | ||
33 | ''self'' http://localhost:3000; img-src ''self'' https: data: blob: http://localhost:3000; | ||
34 | style-src ''self'' http://localhost:3000 ''nonce-RxDFidMVBP749+Clx1+8aw==''; | ||
35 | media-src ''self'' https: data: http://localhost:3000; frame-src ''self'' | ||
36 | https:; manifest-src ''self'' http://localhost:3000; connect-src ''self'' | ||
37 | data: blob: http://localhost:3000 http://localhost:3000 ws://localhost:4000 | ||
38 | ws://localhost:3035 http://localhost:3035; script-src ''self'' ''unsafe-inline'' | ||
39 | ''unsafe-eval'' http://localhost:3000; child-src ''self'' blob: http://localhost:3000; | ||
40 | worker-src ''self'' blob: http://localhost:3000' | ||
41 | Content-Type: | ||
42 | - application/json; charset=utf-8 | ||
43 | ETag: | ||
44 | - W/"64e75b24178056323c06993045dbe4c7" | ||
45 | Referrer-Policy: | ||
46 | - strict-origin-when-cross-origin | ||
47 | Transfer-Encoding: | ||
48 | - chunked | ||
49 | Vary: | ||
50 | - Accept, Origin | ||
51 | X-Content-Type-Options: | ||
52 | - nosniff | ||
53 | X-Download-Options: | ||
54 | - noopen | ||
55 | X-Frame-Options: | ||
56 | - SAMEORIGIN | ||
57 | X-Permitted-Cross-Domain-Policies: | ||
58 | - none | ||
59 | X-RateLimit-Limit: | ||
60 | - '300' | ||
61 | X-RateLimit-Remaining: | ||
62 | - '298' | ||
63 | X-RateLimit-Reset: | ||
64 | - '2022-11-24T00:00:00.737245Z' | ||
65 | X-Request-Id: | ||
66 | - 848e2c0a-9d55-44ac-8913-99c3b3e9fd31 | ||
67 | X-Runtime: | ||
68 | - '0.048887' | ||
69 | X-XSS-Protection: | ||
70 | - 1; mode=block | ||
71 | status: | ||
72 | code: 200 | ||
73 | message: OK | ||
74 | - request: | ||
75 | body: null | ||
76 | headers: | ||
77 | Accept: | ||
78 | - '*/*' | ||
79 | Accept-Encoding: | ||
80 | - gzip, deflate | ||
81 | Authorization: | ||
82 | - Bearer __MASTODON_PY_TEST_ACCESS_TOKEN | ||
83 | Connection: | ||
84 | - keep-alive | ||
85 | User-Agent: | ||
86 | - tests/v311 | ||
87 | method: GET | ||
88 | uri: http://localhost:3000/api/v1/notifications?exclude_types%5B%5D=mention | ||
89 | response: | ||
90 | body: | ||
91 | string: '[]' | ||
92 | headers: | ||
93 | Cache-Control: | ||
94 | - no-store | ||
95 | Content-Security-Policy: | ||
96 | - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src | ||
97 | ''self'' http://localhost:3000; img-src ''self'' https: data: blob: http://localhost:3000; | ||
98 | style-src ''self'' http://localhost:3000 ''nonce-1WM1ilFhpA5lRxjqJ3bdvQ==''; | ||
99 | media-src ''self'' https: data: http://localhost:3000; frame-src ''self'' | ||
100 | https:; manifest-src ''self'' http://localhost:3000; connect-src ''self'' | ||
101 | data: blob: http://localhost:3000 http://localhost:3000 ws://localhost:4000 | ||
102 | ws://localhost:3035 http://localhost:3035; script-src ''self'' ''unsafe-inline'' | ||
103 | ''unsafe-eval'' http://localhost:3000; child-src ''self'' blob: http://localhost:3000; | ||
104 | worker-src ''self'' blob: http://localhost:3000' | ||
105 | Content-Type: | ||
106 | - application/json; charset=utf-8 | ||
107 | ETag: | ||
108 | - W/"4f53cda18c2baa0c0354bb5f9a3ecbe5" | ||
109 | Referrer-Policy: | ||
110 | - strict-origin-when-cross-origin | ||
111 | Transfer-Encoding: | ||
112 | - chunked | ||
113 | Vary: | ||
114 | - Accept, Origin | ||
115 | X-Content-Type-Options: | ||
116 | - nosniff | ||
117 | X-Download-Options: | ||
118 | - noopen | ||
119 | X-Frame-Options: | ||
120 | - SAMEORIGIN | ||
121 | X-Permitted-Cross-Domain-Policies: | ||
122 | - none | ||
123 | X-Request-Id: | ||
124 | - 0c34535c-f56a-4d32-a9b1-9b04cb5da005 | ||
125 | X-Runtime: | ||
126 | - '0.039520' | ||
127 | X-XSS-Protection: | ||
128 | - 1; mode=block | ||
129 | status: | ||
130 | code: 200 | ||
131 | message: OK | ||
132 | - request: | ||
133 | body: null | ||
134 | headers: | ||
135 | Accept: | ||
136 | - '*/*' | ||
137 | Accept-Encoding: | ||
138 | - gzip, deflate | ||
139 | Authorization: | ||
140 | - Bearer __MASTODON_PY_TEST_ACCESS_TOKEN_2 | ||
141 | Connection: | ||
142 | - keep-alive | ||
143 | Content-Length: | ||
144 | - '0' | ||
145 | User-Agent: | ||
146 | - tests/v311 | ||
147 | method: DELETE | ||
148 | uri: http://localhost:3000/api/v1/statuses/109395782710280813 | ||
149 | response: | ||
150 | body: | ||
151 | string: '{"id":"109395782710280813","created_at":"2022-11-23T23:46:12.705Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/admin/statuses/109395782710280813","url":"http://localhost:3000/@admin/109395782710280813","replies_count":0,"reblogs_count":0,"favourites_count":0,"edited_at":null,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"pinned":false,"text":"@mastodonpy_test | ||
152 | hello!","filtered":[],"reblog":null,"application":{"name":"Mastodon.py test | ||
153 | suite","website":null},"account":{"id":"109384259794974437","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":8,"last_status_at":"2022-11-23","noindex":false,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[{"id":"109384260022953307","username":"mastodonpy_test","url":"http://localhost:3000/@mastodonpy_test","acct":"mastodonpy_test"}],"tags":[],"emojis":[],"card":null,"poll":null}' | ||
154 | headers: | ||
155 | Cache-Control: | ||
156 | - no-store | ||
157 | Content-Security-Policy: | ||
158 | - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src | ||
159 | ''self'' http://localhost:3000; img-src ''self'' https: data: blob: http://localhost:3000; | ||
160 | style-src ''self'' http://localhost:3000 ''nonce-FSqEPJy0kerEUKSRr+JJOg==''; | ||
161 | media-src ''self'' https: data: http://localhost:3000; frame-src ''self'' | ||
162 | https:; manifest-src ''self'' http://localhost:3000; connect-src ''self'' | ||
163 | data: blob: http://localhost:3000 http://localhost:3000 ws://localhost:4000 | ||
164 | ws://localhost:3035 http://localhost:3035; script-src ''self'' ''unsafe-inline'' | ||
165 | ''unsafe-eval'' http://localhost:3000; child-src ''self'' blob: http://localhost:3000; | ||
166 | worker-src ''self'' blob: http://localhost:3000' | ||
167 | Content-Type: | ||
168 | - application/json; charset=utf-8 | ||
169 | ETag: | ||
170 | - W/"2eb049040b906f60fd6a4140220c3a7d" | ||
171 | Referrer-Policy: | ||
172 | - strict-origin-when-cross-origin | ||
173 | Transfer-Encoding: | ||
174 | - chunked | ||
175 | Vary: | ||
176 | - Accept, Origin | ||
177 | X-Content-Type-Options: | ||
178 | - nosniff | ||
179 | X-Download-Options: | ||
180 | - noopen | ||
181 | X-Frame-Options: | ||
182 | - SAMEORIGIN | ||
183 | X-Permitted-Cross-Domain-Policies: | ||
184 | - none | ||
185 | X-Request-Id: | ||
186 | - edee00c4-33ce-41c7-a3ce-40c112bb1aae | ||
187 | X-Runtime: | ||
188 | - '0.033217' | ||
189 | X-XSS-Protection: | ||
190 | - 1; mode=block | ||
191 | status: | ||
192 | code: 200 | ||
193 | message: OK | ||
194 | version: 1 | ||
diff --git a/tests/cassettes/test_notifications_mentions_only.yaml b/tests/cassettes/test_notifications_mentions_only.yaml new file mode 100644 index 0000000..c219b48 --- /dev/null +++ b/tests/cassettes/test_notifications_mentions_only.yaml | |||
@@ -0,0 +1,296 @@ | |||
1 | interactions: | ||
2 | - request: | ||
3 | body: status=%40mastodonpy_test+hello%21 | ||
4 | headers: | ||
5 | Accept: | ||
6 | - '*/*' | ||
7 | Accept-Encoding: | ||
8 | - gzip, deflate | ||
9 | Authorization: | ||
10 | - Bearer __MASTODON_PY_TEST_ACCESS_TOKEN_2 | ||
11 | Connection: | ||
12 | - keep-alive | ||
13 | Content-Length: | ||
14 | - '34' | ||
15 | Content-Type: | ||
16 | - application/x-www-form-urlencoded | ||
17 | User-Agent: | ||
18 | - tests/v311 | ||
19 | method: POST | ||
20 | uri: http://localhost:3000/api/v1/statuses | ||
21 | response: | ||
22 | body: | ||
23 | string: '{"id":"109395789871949995","created_at":"2022-11-23T23:48:01.983Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/admin/statuses/109395789871949995","url":"http://localhost:3000/@admin/109395789871949995","replies_count":0,"reblogs_count":0,"favourites_count":0,"edited_at":null,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"pinned":false,"content":"\u003cp\u003e\u003cspan | ||
24 | class=\"h-card\"\u003e\u003ca href=\"http://localhost:3000/@mastodonpy_test\" | ||
25 | class=\"u-url mention\"\u003e@\u003cspan\u003emastodonpy_test\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e | ||
26 | hello!\u003c/p\u003e","filtered":[],"reblog":null,"application":{"name":"Mastodon.py | ||
27 | test suite","website":null},"account":{"id":"109384259794974437","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":9,"last_status_at":"2022-11-23","noindex":false,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[{"id":"109384260022953307","username":"mastodonpy_test","url":"http://localhost:3000/@mastodonpy_test","acct":"mastodonpy_test"}],"tags":[],"emojis":[],"card":null,"poll":null}' | ||
28 | headers: | ||
29 | Cache-Control: | ||
30 | - no-store | ||
31 | Content-Security-Policy: | ||
32 | - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src | ||
33 | ''self'' http://localhost:3000; img-src ''self'' https: data: blob: http://localhost:3000; | ||
34 | style-src ''self'' http://localhost:3000 ''nonce-OtGB+BfGWae4vvV2I9CldA==''; | ||
35 | media-src ''self'' https: data: http://localhost:3000; frame-src ''self'' | ||
36 | https:; manifest-src ''self'' http://localhost:3000; connect-src ''self'' | ||
37 | data: blob: http://localhost:3000 http://localhost:3000 ws://localhost:4000 | ||
38 | ws://localhost:3035 http://localhost:3035; script-src ''self'' ''unsafe-inline'' | ||
39 | ''unsafe-eval'' http://localhost:3000; child-src ''self'' blob: http://localhost:3000; | ||
40 | worker-src ''self'' blob: http://localhost:3000' | ||
41 | Content-Type: | ||
42 | - application/json; charset=utf-8 | ||
43 | ETag: | ||
44 | - W/"4819b96b6b2ad7e289713a33edda1e88" | ||
45 | Referrer-Policy: | ||
46 | - strict-origin-when-cross-origin | ||
47 | Transfer-Encoding: | ||
48 | - chunked | ||
49 | Vary: | ||
50 | - Accept, Origin | ||
51 | X-Content-Type-Options: | ||
52 | - nosniff | ||
53 | X-Download-Options: | ||
54 | - noopen | ||
55 | X-Frame-Options: | ||
56 | - SAMEORIGIN | ||
57 | X-Permitted-Cross-Domain-Policies: | ||
58 | - none | ||
59 | X-RateLimit-Limit: | ||
60 | - '300' | ||
61 | X-RateLimit-Remaining: | ||
62 | - '296' | ||
63 | X-RateLimit-Reset: | ||
64 | - '2022-11-24T00:00:00.134065Z' | ||
65 | X-Request-Id: | ||
66 | - e036753d-947d-40d1-9b86-81d0e80cefee | ||
67 | X-Runtime: | ||
68 | - '0.184701' | ||
69 | X-XSS-Protection: | ||
70 | - 1; mode=block | ||
71 | status: | ||
72 | code: 200 | ||
73 | message: OK | ||
74 | - request: | ||
75 | body: null | ||
76 | headers: | ||
77 | Accept: | ||
78 | - '*/*' | ||
79 | Accept-Encoding: | ||
80 | - gzip, deflate | ||
81 | Authorization: | ||
82 | - Bearer __MASTODON_PY_TEST_ACCESS_TOKEN | ||
83 | Connection: | ||
84 | - keep-alive | ||
85 | User-Agent: | ||
86 | - tests/v311 | ||
87 | method: GET | ||
88 | uri: http://localhost:3000/api/v1/notifications?types%5B%5D=mention | ||
89 | response: | ||
90 | body: | ||
91 | string: '[{"id":"21","type":"mention","created_at":"2022-11-23T23:48:02.203Z","account":{"id":"109384259794974437","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":9,"last_status_at":"2022-11-23","noindex":false,"emojis":[],"fields":[]},"status":{"id":"109395789871949995","created_at":"2022-11-23T23:48:01.983Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/admin/statuses/109395789871949995","url":"http://localhost:3000/@admin/109395789871949995","replies_count":0,"reblogs_count":0,"favourites_count":0,"edited_at":null,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"content":"\u003cp\u003e\u003cspan | ||
92 | class=\"h-card\"\u003e\u003ca href=\"http://localhost:3000/@mastodonpy_test\" | ||
93 | class=\"u-url mention\"\u003e@\u003cspan\u003emastodonpy_test\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e | ||
94 | hello!\u003c/p\u003e","filtered":[],"reblog":null,"application":{"name":"Mastodon.py | ||
95 | test suite","website":null},"account":{"id":"109384259794974437","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":9,"last_status_at":"2022-11-23","noindex":false,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[{"id":"109384260022953307","username":"mastodonpy_test","url":"http://localhost:3000/@mastodonpy_test","acct":"mastodonpy_test"}],"tags":[],"emojis":[],"card":null,"poll":null}},{"id":"17","type":"mention","created_at":"2022-11-21T23:06:21.025Z","account":{"id":"109384260135049902","username":"mastodonpy_test_2","acct":"mastodonpy_test_2","display_name":"","locked":false,"bot":false,"discoverable":true,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@mastodonpy_test_2","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":0,"last_status_at":null,"noindex":false,"emojis":[],"fields":[]},"status":{"id":"109384301340129379","created_at":"2022-11-21T23:06:20.898Z","in_reply_to_id":"109384301270458447","in_reply_to_account_id":"109384260022953307","sensitive":false,"spoiler_text":"","visibility":"direct","language":"ja","uri":"http://localhost:3000/users/mastodonpy_test_2/statuses/109384301340129379","url":"http://localhost:3000/@mastodonpy_test_2/109384301340129379","replies_count":0,"reblogs_count":0,"favourites_count":0,"edited_at":null,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"content":"\u003cp\u003e\u003cspan | ||
96 | class=\"h-card\"\u003e\u003ca href=\"http://localhost:3000/@mastodonpy_test\" | ||
97 | class=\"u-url mention\"\u003e@\u003cspan\u003emastodonpy_test\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e | ||
98 | pssssst!\u003c/p\u003e","filtered":[],"reblog":null,"application":{"name":"Mastodon.py | ||
99 | test suite","website":null},"account":{"id":"109384260135049902","username":"mastodonpy_test_2","acct":"mastodonpy_test_2","display_name":"","locked":false,"bot":false,"discoverable":true,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@mastodonpy_test_2","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":0,"last_status_at":null,"noindex":false,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[{"id":"109384260022953307","username":"mastodonpy_test","url":"http://localhost:3000/@mastodonpy_test","acct":"mastodonpy_test"}],"tags":[],"emojis":[],"card":null,"poll":null}},{"id":"15","type":"mention","created_at":"2022-11-21T23:06:20.086Z","account":{"id":"109384259794974437","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":9,"last_status_at":"2022-11-23","noindex":false,"emojis":[],"fields":[]},"status":{"id":"109384301260589758","created_at":"2022-11-21T23:06:19.685Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/admin/statuses/109384301260589758","url":"http://localhost:3000/@admin/109384301260589758","replies_count":0,"reblogs_count":0,"favourites_count":0,"edited_at":null,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"content":"\u003cp\u003e\u003cspan | ||
100 | class=\"h-card\"\u003e\u003ca href=\"http://localhost:3000/@mastodonpy_test\" | ||
101 | class=\"u-url mention\"\u003e@\u003cspan\u003emastodonpy_test\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e | ||
102 | beep beep I\u0026#39;m a jeep\u003c/p\u003e","filtered":[],"reblog":null,"application":{"name":"Mastodon.py | ||
103 | test suite","website":null},"account":{"id":"109384259794974437","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":9,"last_status_at":"2022-11-23","noindex":false,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[{"id":"109384260022953307","username":"mastodonpy_test","url":"http://localhost:3000/@mastodonpy_test","acct":"mastodonpy_test"}],"tags":[],"emojis":[],"card":null,"poll":null}},{"id":"14","type":"mention","created_at":"2022-11-21T23:01:30.098Z","account":{"id":"109384260135049902","username":"mastodonpy_test_2","acct":"mastodonpy_test_2","display_name":"","locked":false,"bot":false,"discoverable":true,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@mastodonpy_test_2","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":0,"last_status_at":null,"noindex":false,"emojis":[],"fields":[]},"status":{"id":"109384282227323431","created_at":"2022-11-21T23:01:29.260Z","in_reply_to_id":"109384282224216103","in_reply_to_account_id":"109384260022953307","sensitive":false,"spoiler_text":"","visibility":"direct","language":"ja","uri":"http://localhost:3000/users/mastodonpy_test_2/statuses/109384282227323431","url":"http://localhost:3000/@mastodonpy_test_2/109384282227323431","replies_count":0,"reblogs_count":0,"favourites_count":0,"edited_at":null,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"content":"\u003cp\u003e\u003cspan | ||
104 | class=\"h-card\"\u003e\u003ca href=\"http://localhost:3000/@mastodonpy_test\" | ||
105 | class=\"u-url mention\"\u003e@\u003cspan\u003emastodonpy_test\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e | ||
106 | pssssst!\u003c/p\u003e","filtered":[],"reblog":null,"application":{"name":"Mastodon.py | ||
107 | test suite","website":null},"account":{"id":"109384260135049902","username":"mastodonpy_test_2","acct":"mastodonpy_test_2","display_name":"","locked":false,"bot":false,"discoverable":true,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@mastodonpy_test_2","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":0,"last_status_at":null,"noindex":false,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[{"id":"109384260022953307","username":"mastodonpy_test","url":"http://localhost:3000/@mastodonpy_test","acct":"mastodonpy_test"}],"tags":[],"emojis":[],"card":null,"poll":null}},{"id":"12","type":"mention","created_at":"2022-11-21T23:01:29.815Z","account":{"id":"109384259794974437","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":9,"last_status_at":"2022-11-23","noindex":false,"emojis":[],"fields":[]},"status":{"id":"109384282218092087","created_at":"2022-11-21T23:01:29.120Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/admin/statuses/109384282218092087","url":"http://localhost:3000/@admin/109384282218092087","replies_count":0,"reblogs_count":0,"favourites_count":0,"edited_at":"2022-11-21T23:01:31.316Z","favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"content":"\u003cp\u003e\u003cspan | ||
108 | class=\"h-card\"\u003e\u003ca href=\"http://localhost:3000/@mastodonpy_test\" | ||
109 | class=\"u-url mention\"\u003e@\u003cspan\u003emastodonpy_test\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e | ||
110 | beep beep I\u0026#39;m a giraffe\u003c/p\u003e","filtered":[],"reblog":null,"application":{"name":"Mastodon.py | ||
111 | test suite","website":null},"account":{"id":"109384259794974437","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":9,"last_status_at":"2022-11-23","noindex":false,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[{"id":"109384260022953307","username":"mastodonpy_test","url":"http://localhost:3000/@mastodonpy_test","acct":"mastodonpy_test"}],"tags":[],"emojis":[],"card":null,"poll":null}},{"id":"11","type":"mention","created_at":"2022-11-21T22:58:20.111Z","account":{"id":"109384260135049902","username":"mastodonpy_test_2","acct":"mastodonpy_test_2","display_name":"","locked":false,"bot":false,"discoverable":true,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@mastodonpy_test_2","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":0,"last_status_at":null,"noindex":false,"emojis":[],"fields":[]},"status":{"id":"109384269774042068","created_at":"2022-11-21T22:58:19.239Z","in_reply_to_id":"109384269771231130","in_reply_to_account_id":"109384260022953307","sensitive":false,"spoiler_text":"","visibility":"direct","language":"ja","uri":"http://localhost:3000/users/mastodonpy_test_2/statuses/109384269774042068","url":"http://localhost:3000/@mastodonpy_test_2/109384269774042068","replies_count":0,"reblogs_count":0,"favourites_count":0,"edited_at":null,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"content":"\u003cp\u003e\u003cspan | ||
112 | class=\"h-card\"\u003e\u003ca href=\"http://localhost:3000/@mastodonpy_test\" | ||
113 | class=\"u-url mention\"\u003e@\u003cspan\u003emastodonpy_test\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e | ||
114 | pssssst!\u003c/p\u003e","filtered":[],"reblog":null,"application":{"name":"Mastodon.py | ||
115 | test suite","website":null},"account":{"id":"109384260135049902","username":"mastodonpy_test_2","acct":"mastodonpy_test_2","display_name":"","locked":false,"bot":false,"discoverable":true,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@mastodonpy_test_2","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":0,"last_status_at":null,"noindex":false,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[{"id":"109384260022953307","username":"mastodonpy_test","url":"http://localhost:3000/@mastodonpy_test","acct":"mastodonpy_test"}],"tags":[],"emojis":[],"card":null,"poll":null}},{"id":"9","type":"mention","created_at":"2022-11-21T22:58:19.933Z","account":{"id":"109384259794974437","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":9,"last_status_at":"2022-11-23","noindex":false,"emojis":[],"fields":[]},"status":{"id":"109384269765215700","created_at":"2022-11-21T22:58:19.105Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/admin/statuses/109384269765215700","url":"http://localhost:3000/@admin/109384269765215700","replies_count":0,"reblogs_count":0,"favourites_count":0,"edited_at":"2022-11-21T22:58:24.292Z","favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"content":"\u003cp\u003e\u003cspan | ||
116 | class=\"h-card\"\u003e\u003ca href=\"http://localhost:3000/@mastodonpy_test\" | ||
117 | class=\"u-url mention\"\u003e@\u003cspan\u003emastodonpy_test\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e | ||
118 | beep beep I\u0026#39;m a giraffe\u003c/p\u003e","filtered":[],"reblog":null,"application":{"name":"Mastodon.py | ||
119 | test suite","website":null},"account":{"id":"109384259794974437","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":9,"last_status_at":"2022-11-23","noindex":false,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[{"id":"109384260022953307","username":"mastodonpy_test","url":"http://localhost:3000/@mastodonpy_test","acct":"mastodonpy_test"}],"tags":[],"emojis":[],"card":null,"poll":null}},{"id":"8","type":"mention","created_at":"2022-11-21T22:56:17.313Z","account":{"id":"109384260135049902","username":"mastodonpy_test_2","acct":"mastodonpy_test_2","display_name":"","locked":false,"bot":false,"discoverable":true,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@mastodonpy_test_2","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":0,"last_status_at":null,"noindex":false,"emojis":[],"fields":[]},"status":{"id":"109384261733170175","created_at":"2022-11-21T22:56:16.544Z","in_reply_to_id":"109384261729433703","in_reply_to_account_id":"109384260022953307","sensitive":false,"spoiler_text":"","visibility":"direct","language":"ja","uri":"http://localhost:3000/users/mastodonpy_test_2/statuses/109384261733170175","url":"http://localhost:3000/@mastodonpy_test_2/109384261733170175","replies_count":0,"reblogs_count":0,"favourites_count":0,"edited_at":null,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"content":"\u003cp\u003e\u003cspan | ||
120 | class=\"h-card\"\u003e\u003ca href=\"http://localhost:3000/@mastodonpy_test\" | ||
121 | class=\"u-url mention\"\u003e@\u003cspan\u003emastodonpy_test\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e | ||
122 | pssssst!\u003c/p\u003e","filtered":[],"reblog":null,"application":{"name":"Mastodon.py | ||
123 | test suite","website":null},"account":{"id":"109384260135049902","username":"mastodonpy_test_2","acct":"mastodonpy_test_2","display_name":"","locked":false,"bot":false,"discoverable":true,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@mastodonpy_test_2","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":0,"last_status_at":null,"noindex":false,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[{"id":"109384260022953307","username":"mastodonpy_test","url":"http://localhost:3000/@mastodonpy_test","acct":"mastodonpy_test"}],"tags":[],"emojis":[],"card":null,"poll":null}},{"id":"6","type":"mention","created_at":"2022-11-21T22:56:17.126Z","account":{"id":"109384259794974437","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":9,"last_status_at":"2022-11-23","noindex":false,"emojis":[],"fields":[]},"status":{"id":"109384261718850765","created_at":"2022-11-21T22:56:16.349Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/admin/statuses/109384261718850765","url":"http://localhost:3000/@admin/109384261718850765","replies_count":0,"reblogs_count":0,"favourites_count":0,"edited_at":"2022-11-21T22:56:21.618Z","favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"content":"\u003cp\u003e\u003cspan | ||
124 | class=\"h-card\"\u003e\u003ca href=\"http://localhost:3000/@mastodonpy_test\" | ||
125 | class=\"u-url mention\"\u003e@\u003cspan\u003emastodonpy_test\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e | ||
126 | beep beep I\u0026#39;m a giraffe\u003c/p\u003e","filtered":[],"reblog":null,"application":{"name":"Mastodon.py | ||
127 | test suite","website":null},"account":{"id":"109384259794974437","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":9,"last_status_at":"2022-11-23","noindex":false,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[{"id":"109384260022953307","username":"mastodonpy_test","url":"http://localhost:3000/@mastodonpy_test","acct":"mastodonpy_test"}],"tags":[],"emojis":[],"card":null,"poll":null}}]' | ||
128 | headers: | ||
129 | Cache-Control: | ||
130 | - no-store | ||
131 | Content-Security-Policy: | ||
132 | - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src | ||
133 | ''self'' http://localhost:3000; img-src ''self'' https: data: blob: http://localhost:3000; | ||
134 | style-src ''self'' http://localhost:3000 ''nonce-+T+kG97ld7qxWUvl9gmznA==''; | ||
135 | media-src ''self'' https: data: http://localhost:3000; frame-src ''self'' | ||
136 | https:; manifest-src ''self'' http://localhost:3000; connect-src ''self'' | ||
137 | data: blob: http://localhost:3000 http://localhost:3000 ws://localhost:4000 | ||
138 | ws://localhost:3035 http://localhost:3035; script-src ''self'' ''unsafe-inline'' | ||
139 | ''unsafe-eval'' http://localhost:3000; child-src ''self'' blob: http://localhost:3000; | ||
140 | worker-src ''self'' blob: http://localhost:3000' | ||
141 | Content-Type: | ||
142 | - application/json; charset=utf-8 | ||
143 | ETag: | ||
144 | - W/"8448175d69001115042d64cc4a5e7fa4" | ||
145 | Link: | ||
146 | - <http://localhost:3000/api/v1/notifications?max_id=6&types%5B%5D=mention>; | ||
147 | rel="next", <http://localhost:3000/api/v1/notifications?min_id=21&types%5B%5D=mention>; | ||
148 | rel="prev" | ||
149 | Referrer-Policy: | ||
150 | - strict-origin-when-cross-origin | ||
151 | Transfer-Encoding: | ||
152 | - chunked | ||
153 | Vary: | ||
154 | - Accept, Origin | ||
155 | X-Content-Type-Options: | ||
156 | - nosniff | ||
157 | X-Download-Options: | ||
158 | - noopen | ||
159 | X-Frame-Options: | ||
160 | - SAMEORIGIN | ||
161 | X-Permitted-Cross-Domain-Policies: | ||
162 | - none | ||
163 | X-Request-Id: | ||
164 | - 2ad126f4-87ca-414a-9f3e-82b7675ed112 | ||
165 | X-Runtime: | ||
166 | - '0.094481' | ||
167 | X-XSS-Protection: | ||
168 | - 1; mode=block | ||
169 | status: | ||
170 | code: 200 | ||
171 | message: OK | ||
172 | - request: | ||
173 | body: null | ||
174 | headers: | ||
175 | Accept: | ||
176 | - '*/*' | ||
177 | Accept-Encoding: | ||
178 | - gzip, deflate | ||
179 | Authorization: | ||
180 | - Bearer __MASTODON_PY_TEST_ACCESS_TOKEN | ||
181 | Connection: | ||
182 | - keep-alive | ||
183 | User-Agent: | ||
184 | - tests/v311 | ||
185 | method: GET | ||
186 | uri: http://localhost:3000/api/v1/notifications/21 | ||
187 | response: | ||
188 | body: | ||
189 | string: '{"id":"21","type":"mention","created_at":"2022-11-23T23:48:02.203Z","account":{"id":"109384259794974437","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":9,"last_status_at":"2022-11-23","noindex":false,"emojis":[],"fields":[]},"status":{"id":"109395789871949995","created_at":"2022-11-23T23:48:01.983Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/admin/statuses/109395789871949995","url":"http://localhost:3000/@admin/109395789871949995","replies_count":0,"reblogs_count":0,"favourites_count":0,"edited_at":null,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"content":"\u003cp\u003e\u003cspan | ||
190 | class=\"h-card\"\u003e\u003ca href=\"http://localhost:3000/@mastodonpy_test\" | ||
191 | class=\"u-url mention\"\u003e@\u003cspan\u003emastodonpy_test\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e | ||
192 | hello!\u003c/p\u003e","filtered":[],"reblog":null,"application":{"name":"Mastodon.py | ||
193 | test suite","website":null},"account":{"id":"109384259794974437","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":9,"last_status_at":"2022-11-23","noindex":false,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[{"id":"109384260022953307","username":"mastodonpy_test","url":"http://localhost:3000/@mastodonpy_test","acct":"mastodonpy_test"}],"tags":[],"emojis":[],"card":null,"poll":null}}' | ||
194 | headers: | ||
195 | Cache-Control: | ||
196 | - no-store | ||
197 | Content-Security-Policy: | ||
198 | - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src | ||
199 | ''self'' http://localhost:3000; img-src ''self'' https: data: blob: http://localhost:3000; | ||
200 | style-src ''self'' http://localhost:3000 ''nonce-uybBVEaQrAz7fKhZpBplZg==''; | ||
201 | media-src ''self'' https: data: http://localhost:3000; frame-src ''self'' | ||
202 | https:; manifest-src ''self'' http://localhost:3000; connect-src ''self'' | ||
203 | data: blob: http://localhost:3000 http://localhost:3000 ws://localhost:4000 | ||
204 | ws://localhost:3035 http://localhost:3035; script-src ''self'' ''unsafe-inline'' | ||
205 | ''unsafe-eval'' http://localhost:3000; child-src ''self'' blob: http://localhost:3000; | ||
206 | worker-src ''self'' blob: http://localhost:3000' | ||
207 | Content-Type: | ||
208 | - application/json; charset=utf-8 | ||
209 | ETag: | ||
210 | - W/"d866fa4990973c5455a13d49e30b146d" | ||
211 | Referrer-Policy: | ||
212 | - strict-origin-when-cross-origin | ||
213 | Transfer-Encoding: | ||
214 | - chunked | ||
215 | Vary: | ||
216 | - Accept, Origin | ||
217 | X-Content-Type-Options: | ||
218 | - nosniff | ||
219 | X-Download-Options: | ||
220 | - noopen | ||
221 | X-Frame-Options: | ||
222 | - SAMEORIGIN | ||
223 | X-Permitted-Cross-Domain-Policies: | ||
224 | - none | ||
225 | X-Request-Id: | ||
226 | - 524cc510-4bc8-4963-8f45-0d728394ee7f | ||
227 | X-Runtime: | ||
228 | - '0.024908' | ||
229 | X-XSS-Protection: | ||
230 | - 1; mode=block | ||
231 | status: | ||
232 | code: 200 | ||
233 | message: OK | ||
234 | - request: | ||
235 | body: null | ||
236 | headers: | ||
237 | Accept: | ||
238 | - '*/*' | ||
239 | Accept-Encoding: | ||
240 | - gzip, deflate | ||
241 | Authorization: | ||
242 | - Bearer __MASTODON_PY_TEST_ACCESS_TOKEN_2 | ||
243 | Connection: | ||
244 | - keep-alive | ||
245 | Content-Length: | ||
246 | - '0' | ||
247 | User-Agent: | ||
248 | - tests/v311 | ||
249 | method: DELETE | ||
250 | uri: http://localhost:3000/api/v1/statuses/109395789871949995 | ||
251 | response: | ||
252 | body: | ||
253 | string: '{"id":"109395789871949995","created_at":"2022-11-23T23:48:01.983Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/admin/statuses/109395789871949995","url":"http://localhost:3000/@admin/109395789871949995","replies_count":0,"reblogs_count":0,"favourites_count":0,"edited_at":null,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"pinned":false,"text":"@mastodonpy_test | ||
254 | hello!","filtered":[],"reblog":null,"application":{"name":"Mastodon.py test | ||
255 | suite","website":null},"account":{"id":"109384259794974437","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":8,"last_status_at":"2022-11-23","noindex":false,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[{"id":"109384260022953307","username":"mastodonpy_test","url":"http://localhost:3000/@mastodonpy_test","acct":"mastodonpy_test"}],"tags":[],"emojis":[],"card":null,"poll":null}' | ||
256 | headers: | ||
257 | Cache-Control: | ||
258 | - no-store | ||
259 | Content-Security-Policy: | ||
260 | - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src | ||
261 | ''self'' http://localhost:3000; img-src ''self'' https: data: blob: http://localhost:3000; | ||
262 | style-src ''self'' http://localhost:3000 ''nonce-IJvw8zA4Y14LItWz2dIbCA==''; | ||
263 | media-src ''self'' https: data: http://localhost:3000; frame-src ''self'' | ||
264 | https:; manifest-src ''self'' http://localhost:3000; connect-src ''self'' | ||
265 | data: blob: http://localhost:3000 http://localhost:3000 ws://localhost:4000 | ||
266 | ws://localhost:3035 http://localhost:3035; script-src ''self'' ''unsafe-inline'' | ||
267 | ''unsafe-eval'' http://localhost:3000; child-src ''self'' blob: http://localhost:3000; | ||
268 | worker-src ''self'' blob: http://localhost:3000' | ||
269 | Content-Type: | ||
270 | - application/json; charset=utf-8 | ||
271 | ETag: | ||
272 | - W/"14997f44bf86df6d687c824ebb073577" | ||
273 | Referrer-Policy: | ||
274 | - strict-origin-when-cross-origin | ||
275 | Transfer-Encoding: | ||
276 | - chunked | ||
277 | Vary: | ||
278 | - Accept, Origin | ||
279 | X-Content-Type-Options: | ||
280 | - nosniff | ||
281 | X-Download-Options: | ||
282 | - noopen | ||
283 | X-Frame-Options: | ||
284 | - SAMEORIGIN | ||
285 | X-Permitted-Cross-Domain-Policies: | ||
286 | - none | ||
287 | X-Request-Id: | ||
288 | - b14404b1-b455-4d01-9903-6fb9510166e0 | ||
289 | X-Runtime: | ||
290 | - '0.029922' | ||
291 | X-XSS-Protection: | ||
292 | - 1; mode=block | ||
293 | status: | ||
294 | code: 200 | ||
295 | message: OK | ||
296 | version: 1 | ||
diff --git a/tests/cassettes/test_notifications_types.yaml b/tests/cassettes/test_notifications_types.yaml new file mode 100644 index 0000000..39c4756 --- /dev/null +++ b/tests/cassettes/test_notifications_types.yaml | |||
@@ -0,0 +1,354 @@ | |||
1 | interactions: | ||
2 | - request: | ||
3 | body: status=%40mastodonpy_test+hello%21 | ||
4 | headers: | ||
5 | Accept: | ||
6 | - '*/*' | ||
7 | Accept-Encoding: | ||
8 | - gzip, deflate | ||
9 | Authorization: | ||
10 | - Bearer __MASTODON_PY_TEST_ACCESS_TOKEN_2 | ||
11 | Connection: | ||
12 | - keep-alive | ||
13 | Content-Length: | ||
14 | - '34' | ||
15 | Content-Type: | ||
16 | - application/x-www-form-urlencoded | ||
17 | User-Agent: | ||
18 | - tests/v311 | ||
19 | method: POST | ||
20 | uri: http://localhost:3000/api/v1/statuses | ||
21 | response: | ||
22 | body: | ||
23 | string: '{"id":"109395782916477342","created_at":"2022-11-23T23:46:15.851Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/admin/statuses/109395782916477342","url":"http://localhost:3000/@admin/109395782916477342","replies_count":0,"reblogs_count":0,"favourites_count":0,"edited_at":null,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"pinned":false,"content":"\u003cp\u003e\u003cspan | ||
24 | class=\"h-card\"\u003e\u003ca href=\"http://localhost:3000/@mastodonpy_test\" | ||
25 | class=\"u-url mention\"\u003e@\u003cspan\u003emastodonpy_test\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e | ||
26 | hello!\u003c/p\u003e","filtered":[],"reblog":null,"application":{"name":"Mastodon.py | ||
27 | test suite","website":null},"account":{"id":"109384259794974437","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":9,"last_status_at":"2022-11-23","noindex":false,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[{"id":"109384260022953307","username":"mastodonpy_test","url":"http://localhost:3000/@mastodonpy_test","acct":"mastodonpy_test"}],"tags":[],"emojis":[],"card":null,"poll":null}' | ||
28 | headers: | ||
29 | Cache-Control: | ||
30 | - no-store | ||
31 | Content-Security-Policy: | ||
32 | - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src | ||
33 | ''self'' http://localhost:3000; img-src ''self'' https: data: blob: http://localhost:3000; | ||
34 | style-src ''self'' http://localhost:3000 ''nonce-6pIPZ9iNIQpFIJrYbQlzSw==''; | ||
35 | media-src ''self'' https: data: http://localhost:3000; frame-src ''self'' | ||
36 | https:; manifest-src ''self'' http://localhost:3000; connect-src ''self'' | ||
37 | data: blob: http://localhost:3000 http://localhost:3000 ws://localhost:4000 | ||
38 | ws://localhost:3035 http://localhost:3035; script-src ''self'' ''unsafe-inline'' | ||
39 | ''unsafe-eval'' http://localhost:3000; child-src ''self'' blob: http://localhost:3000; | ||
40 | worker-src ''self'' blob: http://localhost:3000' | ||
41 | Content-Type: | ||
42 | - application/json; charset=utf-8 | ||
43 | ETag: | ||
44 | - W/"dd86c47271062350b14b7a5e21e7fc0b" | ||
45 | Referrer-Policy: | ||
46 | - strict-origin-when-cross-origin | ||
47 | Transfer-Encoding: | ||
48 | - chunked | ||
49 | Vary: | ||
50 | - Accept, Origin | ||
51 | X-Content-Type-Options: | ||
52 | - nosniff | ||
53 | X-Download-Options: | ||
54 | - noopen | ||
55 | X-Frame-Options: | ||
56 | - SAMEORIGIN | ||
57 | X-Permitted-Cross-Domain-Policies: | ||
58 | - none | ||
59 | X-RateLimit-Limit: | ||
60 | - '300' | ||
61 | X-RateLimit-Remaining: | ||
62 | - '297' | ||
63 | X-RateLimit-Reset: | ||
64 | - '2022-11-24T00:00:00.885045Z' | ||
65 | X-Request-Id: | ||
66 | - c8389421-cbd4-46d2-8b1e-b16a9e420921 | ||
67 | X-Runtime: | ||
68 | - '0.049957' | ||
69 | X-XSS-Protection: | ||
70 | - 1; mode=block | ||
71 | status: | ||
72 | code: 200 | ||
73 | message: OK | ||
74 | - request: | ||
75 | body: null | ||
76 | headers: | ||
77 | Accept: | ||
78 | - '*/*' | ||
79 | Accept-Encoding: | ||
80 | - gzip, deflate | ||
81 | Authorization: | ||
82 | - Bearer __MASTODON_PY_TEST_ACCESS_TOKEN | ||
83 | Connection: | ||
84 | - keep-alive | ||
85 | User-Agent: | ||
86 | - tests/v311 | ||
87 | method: GET | ||
88 | uri: http://localhost:3000/api/v1/notifications?types%5B%5D=follow_request | ||
89 | response: | ||
90 | body: | ||
91 | string: '[]' | ||
92 | headers: | ||
93 | Cache-Control: | ||
94 | - no-store | ||
95 | Content-Security-Policy: | ||
96 | - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src | ||
97 | ''self'' http://localhost:3000; img-src ''self'' https: data: blob: http://localhost:3000; | ||
98 | style-src ''self'' http://localhost:3000 ''nonce-V+Wx5mTLwXyUvR89Co7d3g==''; | ||
99 | media-src ''self'' https: data: http://localhost:3000; frame-src ''self'' | ||
100 | https:; manifest-src ''self'' http://localhost:3000; connect-src ''self'' | ||
101 | data: blob: http://localhost:3000 http://localhost:3000 ws://localhost:4000 | ||
102 | ws://localhost:3035 http://localhost:3035; script-src ''self'' ''unsafe-inline'' | ||
103 | ''unsafe-eval'' http://localhost:3000; child-src ''self'' blob: http://localhost:3000; | ||
104 | worker-src ''self'' blob: http://localhost:3000' | ||
105 | Content-Type: | ||
106 | - application/json; charset=utf-8 | ||
107 | ETag: | ||
108 | - W/"4f53cda18c2baa0c0354bb5f9a3ecbe5" | ||
109 | Referrer-Policy: | ||
110 | - strict-origin-when-cross-origin | ||
111 | Transfer-Encoding: | ||
112 | - chunked | ||
113 | Vary: | ||
114 | - Accept, Origin | ||
115 | X-Content-Type-Options: | ||
116 | - nosniff | ||
117 | X-Download-Options: | ||
118 | - noopen | ||
119 | X-Frame-Options: | ||
120 | - SAMEORIGIN | ||
121 | X-Permitted-Cross-Domain-Policies: | ||
122 | - none | ||
123 | X-Request-Id: | ||
124 | - 5993e374-2667-4eb7-9a14-82a681d177a9 | ||
125 | X-Runtime: | ||
126 | - '0.070559' | ||
127 | X-XSS-Protection: | ||
128 | - 1; mode=block | ||
129 | status: | ||
130 | code: 200 | ||
131 | message: OK | ||
132 | - request: | ||
133 | body: null | ||
134 | headers: | ||
135 | Accept: | ||
136 | - '*/*' | ||
137 | Accept-Encoding: | ||
138 | - gzip, deflate | ||
139 | Authorization: | ||
140 | - Bearer __MASTODON_PY_TEST_ACCESS_TOKEN | ||
141 | Connection: | ||
142 | - keep-alive | ||
143 | User-Agent: | ||
144 | - tests/v311 | ||
145 | method: GET | ||
146 | uri: http://localhost:3000/api/v1/notifications?types%5B%5D=follow&types%5B%5D=mention | ||
147 | response: | ||
148 | body: | ||
149 | string: '[{"id":"20","type":"mention","created_at":"2022-11-23T23:46:15.955Z","account":{"id":"109384259794974437","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":9,"last_status_at":"2022-11-23","noindex":false,"emojis":[],"fields":[]},"status":{"id":"109395782916477342","created_at":"2022-11-23T23:46:15.851Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/admin/statuses/109395782916477342","url":"http://localhost:3000/@admin/109395782916477342","replies_count":0,"reblogs_count":0,"favourites_count":0,"edited_at":null,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"content":"\u003cp\u003e\u003cspan | ||
150 | class=\"h-card\"\u003e\u003ca href=\"http://localhost:3000/@mastodonpy_test\" | ||
151 | class=\"u-url mention\"\u003e@\u003cspan\u003emastodonpy_test\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e | ||
152 | hello!\u003c/p\u003e","filtered":[],"reblog":null,"application":{"name":"Mastodon.py | ||
153 | test suite","website":null},"account":{"id":"109384259794974437","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":9,"last_status_at":"2022-11-23","noindex":false,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[{"id":"109384260022953307","username":"mastodonpy_test","url":"http://localhost:3000/@mastodonpy_test","acct":"mastodonpy_test"}],"tags":[],"emojis":[],"card":null,"poll":null}},{"id":"17","type":"mention","created_at":"2022-11-21T23:06:21.025Z","account":{"id":"109384260135049902","username":"mastodonpy_test_2","acct":"mastodonpy_test_2","display_name":"","locked":false,"bot":false,"discoverable":true,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@mastodonpy_test_2","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":0,"last_status_at":null,"noindex":false,"emojis":[],"fields":[]},"status":{"id":"109384301340129379","created_at":"2022-11-21T23:06:20.898Z","in_reply_to_id":"109384301270458447","in_reply_to_account_id":"109384260022953307","sensitive":false,"spoiler_text":"","visibility":"direct","language":"ja","uri":"http://localhost:3000/users/mastodonpy_test_2/statuses/109384301340129379","url":"http://localhost:3000/@mastodonpy_test_2/109384301340129379","replies_count":0,"reblogs_count":0,"favourites_count":0,"edited_at":null,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"content":"\u003cp\u003e\u003cspan | ||
154 | class=\"h-card\"\u003e\u003ca href=\"http://localhost:3000/@mastodonpy_test\" | ||
155 | class=\"u-url mention\"\u003e@\u003cspan\u003emastodonpy_test\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e | ||
156 | pssssst!\u003c/p\u003e","filtered":[],"reblog":null,"application":{"name":"Mastodon.py | ||
157 | test suite","website":null},"account":{"id":"109384260135049902","username":"mastodonpy_test_2","acct":"mastodonpy_test_2","display_name":"","locked":false,"bot":false,"discoverable":true,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@mastodonpy_test_2","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":0,"last_status_at":null,"noindex":false,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[{"id":"109384260022953307","username":"mastodonpy_test","url":"http://localhost:3000/@mastodonpy_test","acct":"mastodonpy_test"}],"tags":[],"emojis":[],"card":null,"poll":null}},{"id":"15","type":"mention","created_at":"2022-11-21T23:06:20.086Z","account":{"id":"109384259794974437","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":9,"last_status_at":"2022-11-23","noindex":false,"emojis":[],"fields":[]},"status":{"id":"109384301260589758","created_at":"2022-11-21T23:06:19.685Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/admin/statuses/109384301260589758","url":"http://localhost:3000/@admin/109384301260589758","replies_count":0,"reblogs_count":0,"favourites_count":0,"edited_at":null,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"content":"\u003cp\u003e\u003cspan | ||
158 | class=\"h-card\"\u003e\u003ca href=\"http://localhost:3000/@mastodonpy_test\" | ||
159 | class=\"u-url mention\"\u003e@\u003cspan\u003emastodonpy_test\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e | ||
160 | beep beep I\u0026#39;m a jeep\u003c/p\u003e","filtered":[],"reblog":null,"application":{"name":"Mastodon.py | ||
161 | test suite","website":null},"account":{"id":"109384259794974437","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":9,"last_status_at":"2022-11-23","noindex":false,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[{"id":"109384260022953307","username":"mastodonpy_test","url":"http://localhost:3000/@mastodonpy_test","acct":"mastodonpy_test"}],"tags":[],"emojis":[],"card":null,"poll":null}},{"id":"14","type":"mention","created_at":"2022-11-21T23:01:30.098Z","account":{"id":"109384260135049902","username":"mastodonpy_test_2","acct":"mastodonpy_test_2","display_name":"","locked":false,"bot":false,"discoverable":true,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@mastodonpy_test_2","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":0,"last_status_at":null,"noindex":false,"emojis":[],"fields":[]},"status":{"id":"109384282227323431","created_at":"2022-11-21T23:01:29.260Z","in_reply_to_id":"109384282224216103","in_reply_to_account_id":"109384260022953307","sensitive":false,"spoiler_text":"","visibility":"direct","language":"ja","uri":"http://localhost:3000/users/mastodonpy_test_2/statuses/109384282227323431","url":"http://localhost:3000/@mastodonpy_test_2/109384282227323431","replies_count":0,"reblogs_count":0,"favourites_count":0,"edited_at":null,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"content":"\u003cp\u003e\u003cspan | ||
162 | class=\"h-card\"\u003e\u003ca href=\"http://localhost:3000/@mastodonpy_test\" | ||
163 | class=\"u-url mention\"\u003e@\u003cspan\u003emastodonpy_test\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e | ||
164 | pssssst!\u003c/p\u003e","filtered":[],"reblog":null,"application":{"name":"Mastodon.py | ||
165 | test suite","website":null},"account":{"id":"109384260135049902","username":"mastodonpy_test_2","acct":"mastodonpy_test_2","display_name":"","locked":false,"bot":false,"discoverable":true,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@mastodonpy_test_2","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":0,"last_status_at":null,"noindex":false,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[{"id":"109384260022953307","username":"mastodonpy_test","url":"http://localhost:3000/@mastodonpy_test","acct":"mastodonpy_test"}],"tags":[],"emojis":[],"card":null,"poll":null}},{"id":"12","type":"mention","created_at":"2022-11-21T23:01:29.815Z","account":{"id":"109384259794974437","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":9,"last_status_at":"2022-11-23","noindex":false,"emojis":[],"fields":[]},"status":{"id":"109384282218092087","created_at":"2022-11-21T23:01:29.120Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/admin/statuses/109384282218092087","url":"http://localhost:3000/@admin/109384282218092087","replies_count":0,"reblogs_count":0,"favourites_count":0,"edited_at":"2022-11-21T23:01:31.316Z","favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"content":"\u003cp\u003e\u003cspan | ||
166 | class=\"h-card\"\u003e\u003ca href=\"http://localhost:3000/@mastodonpy_test\" | ||
167 | class=\"u-url mention\"\u003e@\u003cspan\u003emastodonpy_test\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e | ||
168 | beep beep I\u0026#39;m a giraffe\u003c/p\u003e","filtered":[],"reblog":null,"application":{"name":"Mastodon.py | ||
169 | test suite","website":null},"account":{"id":"109384259794974437","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":9,"last_status_at":"2022-11-23","noindex":false,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[{"id":"109384260022953307","username":"mastodonpy_test","url":"http://localhost:3000/@mastodonpy_test","acct":"mastodonpy_test"}],"tags":[],"emojis":[],"card":null,"poll":null}},{"id":"11","type":"mention","created_at":"2022-11-21T22:58:20.111Z","account":{"id":"109384260135049902","username":"mastodonpy_test_2","acct":"mastodonpy_test_2","display_name":"","locked":false,"bot":false,"discoverable":true,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@mastodonpy_test_2","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":0,"last_status_at":null,"noindex":false,"emojis":[],"fields":[]},"status":{"id":"109384269774042068","created_at":"2022-11-21T22:58:19.239Z","in_reply_to_id":"109384269771231130","in_reply_to_account_id":"109384260022953307","sensitive":false,"spoiler_text":"","visibility":"direct","language":"ja","uri":"http://localhost:3000/users/mastodonpy_test_2/statuses/109384269774042068","url":"http://localhost:3000/@mastodonpy_test_2/109384269774042068","replies_count":0,"reblogs_count":0,"favourites_count":0,"edited_at":null,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"content":"\u003cp\u003e\u003cspan | ||
170 | class=\"h-card\"\u003e\u003ca href=\"http://localhost:3000/@mastodonpy_test\" | ||
171 | class=\"u-url mention\"\u003e@\u003cspan\u003emastodonpy_test\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e | ||
172 | pssssst!\u003c/p\u003e","filtered":[],"reblog":null,"application":{"name":"Mastodon.py | ||
173 | test suite","website":null},"account":{"id":"109384260135049902","username":"mastodonpy_test_2","acct":"mastodonpy_test_2","display_name":"","locked":false,"bot":false,"discoverable":true,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@mastodonpy_test_2","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":0,"last_status_at":null,"noindex":false,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[{"id":"109384260022953307","username":"mastodonpy_test","url":"http://localhost:3000/@mastodonpy_test","acct":"mastodonpy_test"}],"tags":[],"emojis":[],"card":null,"poll":null}},{"id":"9","type":"mention","created_at":"2022-11-21T22:58:19.933Z","account":{"id":"109384259794974437","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":9,"last_status_at":"2022-11-23","noindex":false,"emojis":[],"fields":[]},"status":{"id":"109384269765215700","created_at":"2022-11-21T22:58:19.105Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/admin/statuses/109384269765215700","url":"http://localhost:3000/@admin/109384269765215700","replies_count":0,"reblogs_count":0,"favourites_count":0,"edited_at":"2022-11-21T22:58:24.292Z","favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"content":"\u003cp\u003e\u003cspan | ||
174 | class=\"h-card\"\u003e\u003ca href=\"http://localhost:3000/@mastodonpy_test\" | ||
175 | class=\"u-url mention\"\u003e@\u003cspan\u003emastodonpy_test\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e | ||
176 | beep beep I\u0026#39;m a giraffe\u003c/p\u003e","filtered":[],"reblog":null,"application":{"name":"Mastodon.py | ||
177 | test suite","website":null},"account":{"id":"109384259794974437","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":9,"last_status_at":"2022-11-23","noindex":false,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[{"id":"109384260022953307","username":"mastodonpy_test","url":"http://localhost:3000/@mastodonpy_test","acct":"mastodonpy_test"}],"tags":[],"emojis":[],"card":null,"poll":null}},{"id":"8","type":"mention","created_at":"2022-11-21T22:56:17.313Z","account":{"id":"109384260135049902","username":"mastodonpy_test_2","acct":"mastodonpy_test_2","display_name":"","locked":false,"bot":false,"discoverable":true,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@mastodonpy_test_2","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":0,"last_status_at":null,"noindex":false,"emojis":[],"fields":[]},"status":{"id":"109384261733170175","created_at":"2022-11-21T22:56:16.544Z","in_reply_to_id":"109384261729433703","in_reply_to_account_id":"109384260022953307","sensitive":false,"spoiler_text":"","visibility":"direct","language":"ja","uri":"http://localhost:3000/users/mastodonpy_test_2/statuses/109384261733170175","url":"http://localhost:3000/@mastodonpy_test_2/109384261733170175","replies_count":0,"reblogs_count":0,"favourites_count":0,"edited_at":null,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"content":"\u003cp\u003e\u003cspan | ||
178 | class=\"h-card\"\u003e\u003ca href=\"http://localhost:3000/@mastodonpy_test\" | ||
179 | class=\"u-url mention\"\u003e@\u003cspan\u003emastodonpy_test\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e | ||
180 | pssssst!\u003c/p\u003e","filtered":[],"reblog":null,"application":{"name":"Mastodon.py | ||
181 | test suite","website":null},"account":{"id":"109384260135049902","username":"mastodonpy_test_2","acct":"mastodonpy_test_2","display_name":"","locked":false,"bot":false,"discoverable":true,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@mastodonpy_test_2","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":0,"last_status_at":null,"noindex":false,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[{"id":"109384260022953307","username":"mastodonpy_test","url":"http://localhost:3000/@mastodonpy_test","acct":"mastodonpy_test"}],"tags":[],"emojis":[],"card":null,"poll":null}},{"id":"6","type":"mention","created_at":"2022-11-21T22:56:17.126Z","account":{"id":"109384259794974437","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":9,"last_status_at":"2022-11-23","noindex":false,"emojis":[],"fields":[]},"status":{"id":"109384261718850765","created_at":"2022-11-21T22:56:16.349Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/admin/statuses/109384261718850765","url":"http://localhost:3000/@admin/109384261718850765","replies_count":0,"reblogs_count":0,"favourites_count":0,"edited_at":"2022-11-21T22:56:21.618Z","favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"content":"\u003cp\u003e\u003cspan | ||
182 | class=\"h-card\"\u003e\u003ca href=\"http://localhost:3000/@mastodonpy_test\" | ||
183 | class=\"u-url mention\"\u003e@\u003cspan\u003emastodonpy_test\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e | ||
184 | beep beep I\u0026#39;m a giraffe\u003c/p\u003e","filtered":[],"reblog":null,"application":{"name":"Mastodon.py | ||
185 | test suite","website":null},"account":{"id":"109384259794974437","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":9,"last_status_at":"2022-11-23","noindex":false,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[{"id":"109384260022953307","username":"mastodonpy_test","url":"http://localhost:3000/@mastodonpy_test","acct":"mastodonpy_test"}],"tags":[],"emojis":[],"card":null,"poll":null}}]' | ||
186 | headers: | ||
187 | Cache-Control: | ||
188 | - no-store | ||
189 | Content-Security-Policy: | ||
190 | - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src | ||
191 | ''self'' http://localhost:3000; img-src ''self'' https: data: blob: http://localhost:3000; | ||
192 | style-src ''self'' http://localhost:3000 ''nonce-wYrwHk5UigmCcNPC9VGxRQ==''; | ||
193 | media-src ''self'' https: data: http://localhost:3000; frame-src ''self'' | ||
194 | https:; manifest-src ''self'' http://localhost:3000; connect-src ''self'' | ||
195 | data: blob: http://localhost:3000 http://localhost:3000 ws://localhost:4000 | ||
196 | ws://localhost:3035 http://localhost:3035; script-src ''self'' ''unsafe-inline'' | ||
197 | ''unsafe-eval'' http://localhost:3000; child-src ''self'' blob: http://localhost:3000; | ||
198 | worker-src ''self'' blob: http://localhost:3000' | ||
199 | Content-Type: | ||
200 | - application/json; charset=utf-8 | ||
201 | ETag: | ||
202 | - W/"cdf647c6954e469aba5008a91f7d4dc9" | ||
203 | Link: | ||
204 | - <http://localhost:3000/api/v1/notifications?max_id=6&types%5B%5D=follow&types%5B%5D=mention>; | ||
205 | rel="next", <http://localhost:3000/api/v1/notifications?min_id=20&types%5B%5D=follow&types%5B%5D=mention>; | ||
206 | rel="prev" | ||
207 | Referrer-Policy: | ||
208 | - strict-origin-when-cross-origin | ||
209 | Transfer-Encoding: | ||
210 | - chunked | ||
211 | Vary: | ||
212 | - Accept, Origin | ||
213 | X-Content-Type-Options: | ||
214 | - nosniff | ||
215 | X-Download-Options: | ||
216 | - noopen | ||
217 | X-Frame-Options: | ||
218 | - SAMEORIGIN | ||
219 | X-Permitted-Cross-Domain-Policies: | ||
220 | - none | ||
221 | X-Request-Id: | ||
222 | - 400df499-161b-4d51-b363-cc007659ae22 | ||
223 | X-Runtime: | ||
224 | - '0.133966' | ||
225 | X-XSS-Protection: | ||
226 | - 1; mode=block | ||
227 | status: | ||
228 | code: 200 | ||
229 | message: OK | ||
230 | - request: | ||
231 | body: null | ||
232 | headers: | ||
233 | Accept: | ||
234 | - '*/*' | ||
235 | Accept-Encoding: | ||
236 | - gzip, deflate | ||
237 | Authorization: | ||
238 | - Bearer __MASTODON_PY_TEST_ACCESS_TOKEN | ||
239 | Connection: | ||
240 | - keep-alive | ||
241 | User-Agent: | ||
242 | - tests/v311 | ||
243 | method: GET | ||
244 | uri: http://localhost:3000/api/v1/notifications/20 | ||
245 | response: | ||
246 | body: | ||
247 | string: '{"id":"20","type":"mention","created_at":"2022-11-23T23:46:15.955Z","account":{"id":"109384259794974437","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":9,"last_status_at":"2022-11-23","noindex":false,"emojis":[],"fields":[]},"status":{"id":"109395782916477342","created_at":"2022-11-23T23:46:15.851Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/admin/statuses/109395782916477342","url":"http://localhost:3000/@admin/109395782916477342","replies_count":0,"reblogs_count":0,"favourites_count":0,"edited_at":null,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"content":"\u003cp\u003e\u003cspan | ||
248 | class=\"h-card\"\u003e\u003ca href=\"http://localhost:3000/@mastodonpy_test\" | ||
249 | class=\"u-url mention\"\u003e@\u003cspan\u003emastodonpy_test\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e | ||
250 | hello!\u003c/p\u003e","filtered":[],"reblog":null,"application":{"name":"Mastodon.py | ||
251 | test suite","website":null},"account":{"id":"109384259794974437","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":9,"last_status_at":"2022-11-23","noindex":false,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[{"id":"109384260022953307","username":"mastodonpy_test","url":"http://localhost:3000/@mastodonpy_test","acct":"mastodonpy_test"}],"tags":[],"emojis":[],"card":null,"poll":null}}' | ||
252 | headers: | ||
253 | Cache-Control: | ||
254 | - no-store | ||
255 | Content-Security-Policy: | ||
256 | - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src | ||
257 | ''self'' http://localhost:3000; img-src ''self'' https: data: blob: http://localhost:3000; | ||
258 | style-src ''self'' http://localhost:3000 ''nonce-SLq1J0ShZHfval6+63A85Q==''; | ||
259 | media-src ''self'' https: data: http://localhost:3000; frame-src ''self'' | ||
260 | https:; manifest-src ''self'' http://localhost:3000; connect-src ''self'' | ||
261 | data: blob: http://localhost:3000 http://localhost:3000 ws://localhost:4000 | ||
262 | ws://localhost:3035 http://localhost:3035; script-src ''self'' ''unsafe-inline'' | ||
263 | ''unsafe-eval'' http://localhost:3000; child-src ''self'' blob: http://localhost:3000; | ||
264 | worker-src ''self'' blob: http://localhost:3000' | ||
265 | Content-Type: | ||
266 | - application/json; charset=utf-8 | ||
267 | ETag: | ||
268 | - W/"ec21df09d130a8b00bef5d7bf1194f0c" | ||
269 | Referrer-Policy: | ||
270 | - strict-origin-when-cross-origin | ||
271 | Transfer-Encoding: | ||
272 | - chunked | ||
273 | Vary: | ||
274 | - Accept, Origin | ||
275 | X-Content-Type-Options: | ||
276 | - nosniff | ||
277 | X-Download-Options: | ||
278 | - noopen | ||
279 | X-Frame-Options: | ||
280 | - SAMEORIGIN | ||
281 | X-Permitted-Cross-Domain-Policies: | ||
282 | - none | ||
283 | X-Request-Id: | ||
284 | - f4f1a2e1-9470-4f9c-9ad1-ea114686c661 | ||
285 | X-Runtime: | ||
286 | - '0.032645' | ||
287 | X-XSS-Protection: | ||
288 | - 1; mode=block | ||
289 | status: | ||
290 | code: 200 | ||
291 | message: OK | ||
292 | - request: | ||
293 | body: null | ||
294 | headers: | ||
295 | Accept: | ||
296 | - '*/*' | ||
297 | Accept-Encoding: | ||
298 | - gzip, deflate | ||
299 | Authorization: | ||
300 | - Bearer __MASTODON_PY_TEST_ACCESS_TOKEN_2 | ||
301 | Connection: | ||
302 | - keep-alive | ||
303 | Content-Length: | ||
304 | - '0' | ||
305 | User-Agent: | ||
306 | - tests/v311 | ||
307 | method: DELETE | ||
308 | uri: http://localhost:3000/api/v1/statuses/109395782916477342 | ||
309 | response: | ||
310 | body: | ||
311 | string: '{"id":"109395782916477342","created_at":"2022-11-23T23:46:15.851Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/admin/statuses/109395782916477342","url":"http://localhost:3000/@admin/109395782916477342","replies_count":0,"reblogs_count":0,"favourites_count":0,"edited_at":null,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"pinned":false,"text":"@mastodonpy_test | ||
312 | hello!","filtered":[],"reblog":null,"application":{"name":"Mastodon.py test | ||
313 | suite","website":null},"account":{"id":"109384259794974437","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-21T00:00:00.000Z","note":"","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":8,"last_status_at":"2022-11-23","noindex":false,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[{"id":"109384260022953307","username":"mastodonpy_test","url":"http://localhost:3000/@mastodonpy_test","acct":"mastodonpy_test"}],"tags":[],"emojis":[],"card":null,"poll":null}' | ||
314 | headers: | ||
315 | Cache-Control: | ||
316 | - no-store | ||
317 | Content-Security-Policy: | ||
318 | - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src | ||
319 | ''self'' http://localhost:3000; img-src ''self'' https: data: blob: http://localhost:3000; | ||
320 | style-src ''self'' http://localhost:3000 ''nonce-/s83JUB1dihDZNNF69hu8Q==''; | ||
321 | media-src ''self'' https: data: http://localhost:3000; frame-src ''self'' | ||
322 | https:; manifest-src ''self'' http://localhost:3000; connect-src ''self'' | ||
323 | data: blob: http://localhost:3000 http://localhost:3000 ws://localhost:4000 | ||
324 | ws://localhost:3035 http://localhost:3035; script-src ''self'' ''unsafe-inline'' | ||
325 | ''unsafe-eval'' http://localhost:3000; child-src ''self'' blob: http://localhost:3000; | ||
326 | worker-src ''self'' blob: http://localhost:3000' | ||
327 | Content-Type: | ||
328 | - application/json; charset=utf-8 | ||
329 | ETag: | ||
330 | - W/"69038886de73588df13fc758b5551ab6" | ||
331 | Referrer-Policy: | ||
332 | - strict-origin-when-cross-origin | ||
333 | Transfer-Encoding: | ||
334 | - chunked | ||
335 | Vary: | ||
336 | - Accept, Origin | ||
337 | X-Content-Type-Options: | ||
338 | - nosniff | ||
339 | X-Download-Options: | ||
340 | - noopen | ||
341 | X-Frame-Options: | ||
342 | - SAMEORIGIN | ||
343 | X-Permitted-Cross-Domain-Policies: | ||
344 | - none | ||
345 | X-Request-Id: | ||
346 | - 6d564086-bd9e-43a4-bbd6-a7a98c621b54 | ||
347 | X-Runtime: | ||
348 | - '0.051763' | ||
349 | X-XSS-Protection: | ||
350 | - 1; mode=block | ||
351 | status: | ||
352 | code: 200 | ||
353 | message: OK | ||
354 | version: 1 | ||
diff --git a/tests/test_notifications.py b/tests/test_notifications.py index 858bad4..bdd559c 100644 --- a/tests/test_notifications.py +++ b/tests/test_notifications.py | |||
@@ -12,7 +12,46 @@ def mention(api2): | |||
12 | def test_notifications(api, mention): | 12 | def test_notifications(api, mention): |
13 | time.sleep(3) | 13 | time.sleep(3) |
14 | notifications = api.notifications() | 14 | notifications = api.notifications() |
15 | api.notifications(notifications[0]) | 15 | assert api.notifications(notifications[0]) |
16 | assert notifications[0].status.id == mention.id | ||
17 | |||
18 | @pytest.mark.vcr() | ||
19 | def test_notifications_mentions_only(api, mention): | ||
20 | time.sleep(3) | ||
21 | notifications = api.notifications(mentions_only=True) | ||
22 | assert api.notifications(notifications[0]) | ||
23 | assert notifications[0].status.id == mention.id | ||
24 | |||
25 | @pytest.mark.vcr() | ||
26 | def test_notifications_exclude_types(api, mention): | ||
27 | time.sleep(3) | ||
28 | notifications = api.notifications(exclude_types=["mention"]) | ||
29 | if len(notifications) > 0: | ||
30 | assert notifications[0].status.id == mention.id | ||
31 | |||
32 | @pytest.mark.vcr() | ||
33 | def test_notifications_types(api, mention): | ||
34 | time.sleep(3) | ||
35 | notifications = api.notifications(types=["follow_request"]) | ||
36 | if len(notifications) > 0: | ||
37 | assert notifications[0].status.id == mention.id | ||
38 | notifications = api.notifications(types=["follow", "mention"]) | ||
39 | assert api.notifications(notifications[0]) | ||
40 | assert notifications[0].status.id == mention.id | ||
41 | |||
42 | @pytest.mark.vcr() | ||
43 | def test_notifications_exclude_and_types(api, mention): | ||
44 | time.sleep(3) | ||
45 | notifications = api.notifications(exclude_types=["mention"], types=["mention"]) | ||
46 | if len(notifications) > 0: | ||
47 | assert notifications[0].status.id == mention.id | ||
48 | notifications = api.notifications(exclude_types=["mention"], types=["follow_request"]) | ||
49 | if len(notifications) > 0: | ||
50 | assert notifications[0].status.id == mention.id | ||
51 | notifications = api.notifications(exclude_types=["follow_request"], types=["mention"]) | ||
52 | assert notifications[0].status.id == mention.id | ||
53 | notifications = api.notifications(exclude_types=["follow_request"], types=["mention", "follow_request"]) | ||
54 | assert notifications[0].status.id == mention.id | ||
16 | 55 | ||
17 | @pytest.mark.vcr() | 56 | @pytest.mark.vcr() |
18 | def test_notifications_dismiss(api, mention): | 57 | def test_notifications_dismiss(api, mention): |