diff options
author | Lorenz Diener <[email protected]> | 2018-07-30 23:08:30 +0200 |
---|---|---|
committer | Lorenz Diener <[email protected]> | 2018-07-30 23:08:30 +0200 |
commit | 2d81e9b2cbd3e3c1abd3a472220c667e89b29f5e (patch) | |
tree | d8aceee169716fe834edc379fbee5cef86823976 /tests/cassettes/test_filter_create.yaml | |
parent | d04b3da7d5a8f130ad723e5f8797f314cdc072ca (diff) | |
download | mastodon.py-2d81e9b2cbd3e3c1abd3a472220c667e89b29f5e.tar.gz |
Add filter tests
Diffstat (limited to 'tests/cassettes/test_filter_create.yaml')
-rw-r--r-- | tests/cassettes/test_filter_create.yaml | 232 |
1 files changed, 232 insertions, 0 deletions
diff --git a/tests/cassettes/test_filter_create.yaml b/tests/cassettes/test_filter_create.yaml new file mode 100644 index 0000000..626d665 --- /dev/null +++ b/tests/cassettes/test_filter_create.yaml | |||
@@ -0,0 +1,232 @@ | |||
1 | interactions: | ||
2 | - request: | ||
3 | body: whole_word=1&irreversible=0&phrase=anime&context%5B%5D=notifications | ||
4 | headers: | ||
5 | Accept: ['*/*'] | ||
6 | Accept-Encoding: ['gzip, deflate'] | ||
7 | Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN] | ||
8 | Connection: [keep-alive] | ||
9 | Content-Length: ['68'] | ||
10 | Content-Type: [application/x-www-form-urlencoded] | ||
11 | User-Agent: [python-requests/2.18.4] | ||
12 | method: POST | ||
13 | uri: http://localhost:3000/api/v1/filters | ||
14 | response: | ||
15 | body: {string: '{"id":19,"phrase":"anime","context":["notifications"],"whole_word":true,"expires_at":null,"irreversible":false}'} | ||
16 | headers: | ||
17 | Cache-Control: ['max-age=0, private, must-revalidate'] | ||
18 | Content-Type: [application/json; charset=utf-8] | ||
19 | ETag: [W/"1cc3da37e6a9f5aa88132ddc5b7b063d"] | ||
20 | Referrer-Policy: [strict-origin-when-cross-origin] | ||
21 | Transfer-Encoding: [chunked] | ||
22 | Vary: ['Accept-Encoding, Origin'] | ||
23 | X-Content-Type-Options: [nosniff] | ||
24 | X-Download-Options: [noopen] | ||
25 | X-Frame-Options: [SAMEORIGIN] | ||
26 | X-Permitted-Cross-Domain-Policies: [none] | ||
27 | X-Request-Id: [7047db02-fe84-4c31-84d5-3da343408027] | ||
28 | X-Runtime: ['0.038570'] | ||
29 | X-XSS-Protection: [1; mode=block] | ||
30 | content-length: ['111'] | ||
31 | status: {code: 200, message: OK} | ||
32 | - request: | ||
33 | body: null | ||
34 | headers: | ||
35 | Accept: ['*/*'] | ||
36 | Accept-Encoding: ['gzip, deflate'] | ||
37 | Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN] | ||
38 | Connection: [keep-alive] | ||
39 | User-Agent: [python-requests/2.18.4] | ||
40 | method: GET | ||
41 | uri: http://localhost:3000/api/v1/filters | ||
42 | response: | ||
43 | body: {string: '[{"id":1,"phrase":"anime","context":["notifications"],"whole_word":true,"expires_at":null,"irreversible":true},{"id":19,"phrase":"anime","context":["notifications"],"whole_word":true,"expires_at":null,"irreversible":false}]'} | ||
44 | headers: | ||
45 | Cache-Control: ['max-age=0, private, must-revalidate'] | ||
46 | Content-Type: [application/json; charset=utf-8] | ||
47 | ETag: [W/"8c26a5b6dd365532b24a068190d326b6"] | ||
48 | Referrer-Policy: [strict-origin-when-cross-origin] | ||
49 | Transfer-Encoding: [chunked] | ||
50 | Vary: ['Accept-Encoding, Origin'] | ||
51 | X-Content-Type-Options: [nosniff] | ||
52 | X-Download-Options: [noopen] | ||
53 | X-Frame-Options: [SAMEORIGIN] | ||
54 | X-Permitted-Cross-Domain-Policies: [none] | ||
55 | X-Request-Id: [e7994444-9983-4e61-91ea-9ecd18cf2de6] | ||
56 | X-Runtime: ['0.018644'] | ||
57 | X-XSS-Protection: [1; mode=block] | ||
58 | content-length: ['223'] | ||
59 | status: {code: 200, message: OK} | ||
60 | - request: | ||
61 | body: null | ||
62 | headers: | ||
63 | Accept: ['*/*'] | ||
64 | Accept-Encoding: ['gzip, deflate'] | ||
65 | Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN] | ||
66 | Connection: [keep-alive] | ||
67 | User-Agent: [python-requests/2.18.4] | ||
68 | method: GET | ||
69 | uri: http://localhost:3000/api/v1/filters/19 | ||
70 | response: | ||
71 | body: {string: '{"id":19,"phrase":"anime","context":["notifications"],"whole_word":true,"expires_at":null,"irreversible":false}'} | ||
72 | headers: | ||
73 | Cache-Control: ['max-age=0, private, must-revalidate'] | ||
74 | Content-Type: [application/json; charset=utf-8] | ||
75 | ETag: [W/"1cc3da37e6a9f5aa88132ddc5b7b063d"] | ||
76 | Referrer-Policy: [strict-origin-when-cross-origin] | ||
77 | Transfer-Encoding: [chunked] | ||
78 | Vary: ['Accept-Encoding, Origin'] | ||
79 | X-Content-Type-Options: [nosniff] | ||
80 | X-Download-Options: [noopen] | ||
81 | X-Frame-Options: [SAMEORIGIN] | ||
82 | X-Permitted-Cross-Domain-Policies: [none] | ||
83 | X-Request-Id: [beaa5303-23ff-42db-ac05-088421eae737] | ||
84 | X-Runtime: ['0.024738'] | ||
85 | X-XSS-Protection: [1; mode=block] | ||
86 | content-length: ['111'] | ||
87 | status: {code: 200, message: OK} | ||
88 | - request: | ||
89 | body: null | ||
90 | headers: | ||
91 | Accept: ['*/*'] | ||
92 | Accept-Encoding: ['gzip, deflate'] | ||
93 | Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN] | ||
94 | Connection: [keep-alive] | ||
95 | Content-Length: ['0'] | ||
96 | User-Agent: [python-requests/2.18.4] | ||
97 | method: DELETE | ||
98 | uri: http://localhost:3000/api/v1/filters/19 | ||
99 | response: | ||
100 | body: {string: '{}'} | ||
101 | headers: | ||
102 | Cache-Control: ['max-age=0, private, must-revalidate'] | ||
103 | Content-Type: [application/json; charset=utf-8] | ||
104 | ETag: [W/"65c2866b436b8d37236fba79638e73d5"] | ||
105 | Referrer-Policy: [strict-origin-when-cross-origin] | ||
106 | Transfer-Encoding: [chunked] | ||
107 | Vary: ['Accept-Encoding, Origin'] | ||
108 | X-Content-Type-Options: [nosniff] | ||
109 | X-Download-Options: [noopen] | ||
110 | X-Frame-Options: [SAMEORIGIN] | ||
111 | X-Permitted-Cross-Domain-Policies: [none] | ||
112 | X-Request-Id: [c55605aa-c532-4e80-b7eb-2a2001245a37] | ||
113 | X-Runtime: ['0.032768'] | ||
114 | X-XSS-Protection: [1; mode=block] | ||
115 | content-length: ['2'] | ||
116 | status: {code: 200, message: OK} | ||
117 | - request: | ||
118 | body: whole_word=0&irreversible=0&phrase=anime&context%5B%5D=notifications | ||
119 | headers: | ||
120 | Accept: ['*/*'] | ||
121 | Accept-Encoding: ['gzip, deflate'] | ||
122 | Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN] | ||
123 | Connection: [keep-alive] | ||
124 | Content-Length: ['68'] | ||
125 | Content-Type: [application/x-www-form-urlencoded] | ||
126 | User-Agent: [python-requests/2.18.4] | ||
127 | method: POST | ||
128 | uri: http://localhost:3000/api/v1/filters | ||
129 | response: | ||
130 | body: {string: '{"id":20,"phrase":"anime","context":["notifications"],"whole_word":false,"expires_at":null,"irreversible":false}'} | ||
131 | headers: | ||
132 | Cache-Control: ['max-age=0, private, must-revalidate'] | ||
133 | Content-Type: [application/json; charset=utf-8] | ||
134 | ETag: [W/"7c314c3f632dfc88cf3900669c341d1d"] | ||
135 | Referrer-Policy: [strict-origin-when-cross-origin] | ||
136 | Transfer-Encoding: [chunked] | ||
137 | Vary: ['Accept-Encoding, Origin'] | ||
138 | X-Content-Type-Options: [nosniff] | ||
139 | X-Download-Options: [noopen] | ||
140 | X-Frame-Options: [SAMEORIGIN] | ||
141 | X-Permitted-Cross-Domain-Policies: [none] | ||
142 | X-Request-Id: [d75504c9-52ae-442a-a9b1-d32e221e66da] | ||
143 | X-Runtime: ['0.029893'] | ||
144 | X-XSS-Protection: [1; mode=block] | ||
145 | content-length: ['112'] | ||
146 | status: {code: 200, message: OK} | ||
147 | - request: | ||
148 | body: null | ||
149 | headers: | ||
150 | Accept: ['*/*'] | ||
151 | Accept-Encoding: ['gzip, deflate'] | ||
152 | Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN] | ||
153 | Connection: [keep-alive] | ||
154 | User-Agent: [python-requests/2.18.4] | ||
155 | method: GET | ||
156 | uri: http://localhost:3000/api/v1/filters | ||
157 | response: | ||
158 | body: {string: '[{"id":1,"phrase":"anime","context":["notifications"],"whole_word":true,"expires_at":null,"irreversible":true},{"id":20,"phrase":"anime","context":["notifications"],"whole_word":false,"expires_at":null,"irreversible":false}]'} | ||
159 | headers: | ||
160 | Cache-Control: ['max-age=0, private, must-revalidate'] | ||
161 | Content-Type: [application/json; charset=utf-8] | ||
162 | ETag: [W/"90390dfa2fbd844349196815a458d7d1"] | ||
163 | Referrer-Policy: [strict-origin-when-cross-origin] | ||
164 | Transfer-Encoding: [chunked] | ||
165 | Vary: ['Accept-Encoding, Origin'] | ||
166 | X-Content-Type-Options: [nosniff] | ||
167 | X-Download-Options: [noopen] | ||
168 | X-Frame-Options: [SAMEORIGIN] | ||
169 | X-Permitted-Cross-Domain-Policies: [none] | ||
170 | X-Request-Id: [a3bfd49a-cb6f-4316-bc0c-f92f50577aa7] | ||
171 | X-Runtime: ['0.024577'] | ||
172 | X-XSS-Protection: [1; mode=block] | ||
173 | content-length: ['224'] | ||
174 | status: {code: 200, message: OK} | ||
175 | - request: | ||
176 | body: null | ||
177 | headers: | ||
178 | Accept: ['*/*'] | ||
179 | Accept-Encoding: ['gzip, deflate'] | ||
180 | Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN] | ||
181 | Connection: [keep-alive] | ||
182 | User-Agent: [python-requests/2.18.4] | ||
183 | method: GET | ||
184 | uri: http://localhost:3000/api/v1/filters/20 | ||
185 | response: | ||
186 | body: {string: '{"id":20,"phrase":"anime","context":["notifications"],"whole_word":false,"expires_at":null,"irreversible":false}'} | ||
187 | headers: | ||
188 | Cache-Control: ['max-age=0, private, must-revalidate'] | ||
189 | Content-Type: [application/json; charset=utf-8] | ||
190 | ETag: [W/"7c314c3f632dfc88cf3900669c341d1d"] | ||
191 | Referrer-Policy: [strict-origin-when-cross-origin] | ||
192 | Transfer-Encoding: [chunked] | ||
193 | Vary: ['Accept-Encoding, Origin'] | ||
194 | X-Content-Type-Options: [nosniff] | ||
195 | X-Download-Options: [noopen] | ||
196 | X-Frame-Options: [SAMEORIGIN] | ||
197 | X-Permitted-Cross-Domain-Policies: [none] | ||
198 | X-Request-Id: [7340bbb7-708b-4ceb-892c-491587b42a58] | ||
199 | X-Runtime: ['0.021185'] | ||
200 | X-XSS-Protection: [1; mode=block] | ||
201 | content-length: ['112'] | ||
202 | status: {code: 200, message: OK} | ||
203 | - request: | ||
204 | body: null | ||
205 | headers: | ||
206 | Accept: ['*/*'] | ||
207 | Accept-Encoding: ['gzip, deflate'] | ||
208 | Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN] | ||
209 | Connection: [keep-alive] | ||
210 | Content-Length: ['0'] | ||
211 | User-Agent: [python-requests/2.18.4] | ||
212 | method: DELETE | ||
213 | uri: http://localhost:3000/api/v1/filters/20 | ||
214 | response: | ||
215 | body: {string: '{}'} | ||
216 | headers: | ||
217 | Cache-Control: ['max-age=0, private, must-revalidate'] | ||
218 | Content-Type: [application/json; charset=utf-8] | ||
219 | ETag: [W/"65c2866b436b8d37236fba79638e73d5"] | ||
220 | Referrer-Policy: [strict-origin-when-cross-origin] | ||
221 | Transfer-Encoding: [chunked] | ||
222 | Vary: ['Accept-Encoding, Origin'] | ||
223 | X-Content-Type-Options: [nosniff] | ||
224 | X-Download-Options: [noopen] | ||
225 | X-Frame-Options: [SAMEORIGIN] | ||
226 | X-Permitted-Cross-Domain-Policies: [none] | ||
227 | X-Request-Id: [b9d0bff4-9b9e-4e7f-a4d2-9b2ab26de77f] | ||
228 | X-Runtime: ['0.031029'] | ||
229 | X-XSS-Protection: [1; mode=block] | ||
230 | content-length: ['2'] | ||
231 | status: {code: 200, message: OK} | ||
232 | version: 1 | ||