aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLorenz Diener <[email protected]>2018-07-30 23:08:30 +0200
committerLorenz Diener <[email protected]>2018-07-30 23:08:30 +0200
commit2d81e9b2cbd3e3c1abd3a472220c667e89b29f5e (patch)
treed8aceee169716fe834edc379fbee5cef86823976
parentd04b3da7d5a8f130ad723e5f8797f314cdc072ca (diff)
downloadmastodon.py-2d81e9b2cbd3e3c1abd3a472220c667e89b29f5e.tar.gz
Add filter tests
-rw-r--r--mastodon/Mastodon.py38
-rw-r--r--tests/cassettes/test_filter_clientside.yaml565
-rw-r--r--tests/cassettes/test_filter_create.yaml232
-rw-r--r--tests/cassettes/test_filter_serverside.yaml596
-rw-r--r--tests/test_filters.py91
5 files changed, 1506 insertions, 16 deletions
diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py
index 4173c8c..e6d8268 100644
--- a/mastodon/Mastodon.py
+++ b/mastodon/Mastodon.py
@@ -837,7 +837,7 @@ class Mastodon:
837 # Reading data: Keyword filters 837 # Reading data: Keyword filters
838 ### 838 ###
839 @api_version("2.4.3", "2.4.3", __DICT_VERSION_FILTER) 839 @api_version("2.4.3", "2.4.3", __DICT_VERSION_FILTER)
840 def filters(): 840 def filters(self):
841 """ 841 """
842 Fetch all of the logged-in users filters. 842 Fetch all of the logged-in users filters.
843 843
@@ -846,7 +846,7 @@ class Mastodon:
846 return self.__api_request('GET', '/api/v1/filters') 846 return self.__api_request('GET', '/api/v1/filters')
847 847
848 @api_version("2.4.3", "2.4.3", __DICT_VERSION_FILTER) 848 @api_version("2.4.3", "2.4.3", __DICT_VERSION_FILTER)
849 def filter(id): 849 def filter(self, id):
850 """ 850 """
851 Fetches information about the filter with the specified `id`. 851 Fetches information about the filter with the specified `id`.
852 852
@@ -876,8 +876,7 @@ class Mastodon:
876 if keyword_filter["whole_word"] == True: 876 if keyword_filter["whole_word"] == True:
877 filter_string = "\\b" + filter_string + "\\b" 877 filter_string = "\\b" + filter_string + "\\b"
878 filter_strings.append(filter_string) 878 filter_strings.append(filter_string)
879 filter_re = re.compile("|".join(filter_strings)) 879 filter_re = re.compile("|".join(filter_strings), flags = re.IGNORECASE)
880 return filter_re
881 880
882 # Apply 881 # Apply
883 filter_results = [] 882 filter_results = []
@@ -888,7 +887,7 @@ class Mastodon:
888 filter_text = filter_status["content"] 887 filter_text = filter_status["content"]
889 filter_text = re.sub("<.*?>", " ", filter_text) 888 filter_text = re.sub("<.*?>", " ", filter_text)
890 filter_text = re.sub('\s+', ' ', filter_text).strip() 889 filter_text = re.sub('\s+', ' ', filter_text).strip()
891 if not filter_re.match(filter_text): 890 if not filter_re.search(filter_text):
892 filter_results.append(filter_object) 891 filter_results.append(filter_object)
893 return filter_results 892 return filter_results
894 893
@@ -1539,7 +1538,7 @@ class Mastodon:
1539 # Writing data: Keyword filters 1538 # Writing data: Keyword filters
1540 ### 1539 ###
1541 @api_version("2.4.3", "2.4.3", __DICT_VERSION_FILTER) 1540 @api_version("2.4.3", "2.4.3", __DICT_VERSION_FILTER)
1542 def filter_create(phrase, context, irreversible = False, whole_word = True, expires_in = None): 1541 def filter_create(self, phrase, context, irreversible = False, whole_word = True, expires_in = None):
1543 """ 1542 """
1544 Creates a new keyword filter. `phrase` is the phrase that should be 1543 Creates a new keyword filter. `phrase` is the phrase that should be
1545 filtered out, `context` specifies from where to filter the keywords. 1544 filtered out, `context` specifies from where to filter the keywords.
@@ -1565,7 +1564,7 @@ class Mastodon:
1565 return self.__api_request('POST', '/api/v1/filters', params) 1564 return self.__api_request('POST', '/api/v1/filters', params)
1566 1565
1567 @api_version("2.4.3", "2.4.3", __DICT_VERSION_FILTER) 1566 @api_version("2.4.3", "2.4.3", __DICT_VERSION_FILTER)
1568 def filter_update(id, phrase = None, context = None, irreversible = None, whole_word = None, expires_in = None): 1567 def filter_update(self, id, phrase = None, context = None, irreversible = None, whole_word = None, expires_in = None):
1569 """ 1568 """
1570 Updates the filter with the given `id`. Parameters are the same 1569 Updates the filter with the given `id`. Parameters are the same
1571 as in `filter_create()`. 1570 as in `filter_create()`.
@@ -1578,7 +1577,7 @@ class Mastodon:
1578 return self.__api_request('PUT', url, params) 1577 return self.__api_request('PUT', url, params)
1579 1578
1580 @api_version("2.4.3", "2.4.3", "2.4.3") 1579 @api_version("2.4.3", "2.4.3", "2.4.3")
1581 def filter_delete(id): 1580 def filter_delete(self, id):
1582 """ 1581 """
1583 Deletes the filter with the given `id`. 1582 Deletes the filter with the given `id`.
1584 """ 1583 """
@@ -2067,13 +2066,14 @@ class Mastodon:
2067 known_date_fields = ["created_at", "week", "day", "expires_at"] 2066 known_date_fields = ["created_at", "week", "day", "expires_at"]
2068 for k, v in json_object.items(): 2067 for k, v in json_object.items():
2069 if k in known_date_fields: 2068 if k in known_date_fields:
2070 try: 2069 if v != None:
2071 if isinstance(v, int): 2070 try:
2072 json_object[k] = datetime.datetime.fromtimestamp(v, pytz.utc) 2071 if isinstance(v, int):
2073 else: 2072 json_object[k] = datetime.datetime.fromtimestamp(v, pytz.utc)
2074 json_object[k] = dateutil.parser.parse(v) 2073 else:
2075 except: 2074 json_object[k] = dateutil.parser.parse(v)
2076 raise MastodonAPIError('Encountered invalid date.') 2075 except:
2076 raise MastodonAPIError('Encountered invalid date.')
2077 return json_object 2077 return json_object
2078 2078
2079 @staticmethod 2079 @staticmethod
@@ -2406,6 +2406,12 @@ class Mastodon:
2406 del params['self'] 2406 del params['self']
2407 param_keys = list(params.keys()) 2407 param_keys = list(params.keys())
2408 for key in param_keys: 2408 for key in param_keys:
2409 if isinstance(params[key], bool) and params[key] == False:
2410 params[key] = '0'
2411 if isinstance(params[key], bool) and params[key] == True:
2412 params[key] = '1'
2413
2414 for key in param_keys:
2409 if params[key] is None or key in exclude: 2415 if params[key] is None or key in exclude:
2410 del params[key] 2416 del params[key]
2411 2417
@@ -2414,7 +2420,7 @@ class Mastodon:
2414 if isinstance(params[key], list): 2420 if isinstance(params[key], list):
2415 params[key + "[]"] = params[key] 2421 params[key + "[]"] = params[key]
2416 del params[key] 2422 del params[key]
2417 2423
2418 return params 2424 return params
2419 2425
2420 def __unpack_id(self, id): 2426 def __unpack_id(self, id):
diff --git a/tests/cassettes/test_filter_clientside.yaml b/tests/cassettes/test_filter_clientside.yaml
new file mode 100644
index 0000000..93f717c
--- /dev/null
+++ b/tests/cassettes/test_filter_clientside.yaml
@@ -0,0 +1,565 @@
1interactions:
2- request:
3 body: null
4 headers:
5 Accept: ['*/*']
6 Accept-Encoding: ['gzip, deflate']
7 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN_2]
8 Connection: [keep-alive]
9 User-Agent: [python-requests/2.18.4]
10 method: GET
11 uri: http://localhost:3000/api/v1/accounts/verify_credentials
12 response:
13 body: {string: '{"id":"1","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"created_at":"2018-07-13T19:35:33.303Z","note":"\u003cp\u003e\u003c/p\u003e","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":1,"following_count":0,"statuses_count":77,"source":{"privacy":"public","sensitive":false,"language":null,"note":"","fields":[]},"emojis":[],"fields":[]}'}
14 headers:
15 Cache-Control: ['max-age=0, private, must-revalidate']
16 Content-Type: [application/json; charset=utf-8]
17 ETag: [W/"96f1e632bedff53bc417e2e23a83717c"]
18 Referrer-Policy: [strict-origin-when-cross-origin]
19 Transfer-Encoding: [chunked]
20 Vary: ['Accept-Encoding, Origin']
21 X-Content-Type-Options: [nosniff]
22 X-Download-Options: [noopen]
23 X-Frame-Options: [SAMEORIGIN]
24 X-Permitted-Cross-Domain-Policies: [none]
25 X-Request-Id: [eb91d8db-54ed-456e-92c2-b81775633a9d]
26 X-Runtime: ['0.032487']
27 X-XSS-Protection: [1; mode=block]
28 content-length: ['635']
29 status: {code: 200, message: OK}
30- request:
31 body: reblogs=1&id=1
32 headers:
33 Accept: ['*/*']
34 Accept-Encoding: ['gzip, deflate']
35 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
36 Connection: [keep-alive]
37 Content-Length: ['14']
38 Content-Type: [application/x-www-form-urlencoded]
39 User-Agent: [python-requests/2.18.4]
40 method: POST
41 uri: http://localhost:3000/api/v1/accounts/1/follow
42 response:
43 body: {string: '{"id":"1","following":true,"showing_reblogs":true,"followed_by":false,"blocking":false,"muting":false,"muting_notifications":false,"requested":false,"domain_blocking":false}'}
44 headers:
45 Cache-Control: ['max-age=0, private, must-revalidate']
46 Content-Type: [application/json; charset=utf-8]
47 ETag: [W/"fe107f34a56849d06ee76fc843f89760"]
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: [832132c4-9446-4ffb-bb88-9a5c5f2d1da8]
56 X-Runtime: ['0.053476']
57 X-XSS-Protection: [1; mode=block]
58 content-length: ['173']
59 status: {code: 200, message: OK}
60- request:
61 body: whole_word=0&irreversible=0&phrase=anime&context%5B%5D=home
62 headers:
63 Accept: ['*/*']
64 Accept-Encoding: ['gzip, deflate']
65 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
66 Connection: [keep-alive]
67 Content-Length: ['59']
68 Content-Type: [application/x-www-form-urlencoded]
69 User-Agent: [python-requests/2.18.4]
70 method: POST
71 uri: http://localhost:3000/api/v1/filters
72 response:
73 body: {string: '{"id":24,"phrase":"anime","context":["home"],"whole_word":false,"expires_at":null,"irreversible":false}'}
74 headers:
75 Cache-Control: ['max-age=0, private, must-revalidate']
76 Content-Type: [application/json; charset=utf-8]
77 ETag: [W/"1f6f2cfe01cee9c7fa64873d11877e0a"]
78 Referrer-Policy: [strict-origin-when-cross-origin]
79 Transfer-Encoding: [chunked]
80 Vary: ['Accept-Encoding, Origin']
81 X-Content-Type-Options: [nosniff]
82 X-Download-Options: [noopen]
83 X-Frame-Options: [SAMEORIGIN]
84 X-Permitted-Cross-Domain-Policies: [none]
85 X-Request-Id: [0984090a-d260-482d-bc07-60ff9ebcf170]
86 X-Runtime: ['0.041620']
87 X-XSS-Protection: [1; mode=block]
88 content-length: ['103']
89 status: {code: 200, message: OK}
90- request:
91 body: whole_word=1&irreversible=0&phrase=girugamesh&context%5B%5D=home
92 headers:
93 Accept: ['*/*']
94 Accept-Encoding: ['gzip, deflate']
95 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
96 Connection: [keep-alive]
97 Content-Length: ['64']
98 Content-Type: [application/x-www-form-urlencoded]
99 User-Agent: [python-requests/2.18.4]
100 method: POST
101 uri: http://localhost:3000/api/v1/filters
102 response:
103 body: {string: '{"id":25,"phrase":"girugamesh","context":["home"],"whole_word":true,"expires_at":null,"irreversible":false}'}
104 headers:
105 Cache-Control: ['max-age=0, private, must-revalidate']
106 Content-Type: [application/json; charset=utf-8]
107 ETag: [W/"419bc648bfd93411fc0e37da31754670"]
108 Referrer-Policy: [strict-origin-when-cross-origin]
109 Transfer-Encoding: [chunked]
110 Vary: ['Accept-Encoding, Origin']
111 X-Content-Type-Options: [nosniff]
112 X-Download-Options: [noopen]
113 X-Frame-Options: [SAMEORIGIN]
114 X-Permitted-Cross-Domain-Policies: [none]
115 X-Request-Id: [8ad1c23d-fd60-43d1-8519-dacbe2c52957]
116 X-Runtime: ['0.033784']
117 X-XSS-Protection: [1; mode=block]
118 content-length: ['107']
119 status: {code: 200, message: OK}
120- request:
121 body: whole_word=1&irreversible=0&phrase=japanimation&context%5B%5D=notifications
122 headers:
123 Accept: ['*/*']
124 Accept-Encoding: ['gzip, deflate']
125 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
126 Connection: [keep-alive]
127 Content-Length: ['75']
128 Content-Type: [application/x-www-form-urlencoded]
129 User-Agent: [python-requests/2.18.4]
130 method: POST
131 uri: http://localhost:3000/api/v1/filters
132 response:
133 body: {string: '{"id":26,"phrase":"japanimation","context":["notifications"],"whole_word":true,"expires_at":null,"irreversible":false}'}
134 headers:
135 Cache-Control: ['max-age=0, private, must-revalidate']
136 Content-Type: [application/json; charset=utf-8]
137 ETag: [W/"8313201b5ec4886215cc3539b3d5fdb5"]
138 Referrer-Policy: [strict-origin-when-cross-origin]
139 Transfer-Encoding: [chunked]
140 Vary: ['Accept-Encoding, Origin']
141 X-Content-Type-Options: [nosniff]
142 X-Download-Options: [noopen]
143 X-Frame-Options: [SAMEORIGIN]
144 X-Permitted-Cross-Domain-Policies: [none]
145 X-Request-Id: [d1d884b0-a19d-434d-b2b3-480a5f028512]
146 X-Runtime: ['0.033475']
147 X-XSS-Protection: [1; mode=block]
148 content-length: ['118']
149 status: {code: 200, message: OK}
150- request:
151 body: status=I+love+animes
152 headers:
153 Accept: ['*/*']
154 Accept-Encoding: ['gzip, deflate']
155 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN_2]
156 Connection: [keep-alive]
157 Content-Length: ['20']
158 Content-Type: [application/x-www-form-urlencoded]
159 User-Agent: [python-requests/2.18.4]
160 method: POST
161 uri: http://localhost:3000/api/v1/statuses
162 response:
163 body: {string: '{"id":"100465659631900327","created_at":"2018-07-30T20:58:28.365Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":null,"uri":"http://localhost:3000/users/admin/statuses/100465659631900327","content":"\u003cp\u003eI
164 love animes\u003c/p\u003e","url":"http://localhost:3000/@admin/100465659631900327","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Mastodon.py
165 test suite","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"created_at":"2018-07-13T19:35:33.303Z","note":"\u003cp\u003e\u003c/p\u003e","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":1,"following_count":0,"statuses_count":78,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]}'}
166 headers:
167 Cache-Control: ['max-age=0, private, must-revalidate']
168 Content-Type: [application/json; charset=utf-8]
169 ETag: [W/"28c8b2e58a6f138875011985c2cf637e"]
170 Referrer-Policy: [strict-origin-when-cross-origin]
171 Transfer-Encoding: [chunked]
172 Vary: ['Accept-Encoding, Origin']
173 X-Content-Type-Options: [nosniff]
174 X-Download-Options: [noopen]
175 X-Frame-Options: [SAMEORIGIN]
176 X-Permitted-Cross-Domain-Policies: [none]
177 X-Request-Id: [a9c42910-a577-4733-aa68-7ae945287019]
178 X-Runtime: ['0.172233']
179 X-XSS-Protection: [1; mode=block]
180 content-length: ['1173']
181 status: {code: 200, message: OK}
182- request:
183 body: status=Girugamesh%21
184 headers:
185 Accept: ['*/*']
186 Accept-Encoding: ['gzip, deflate']
187 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN_2]
188 Connection: [keep-alive]
189 Content-Length: ['20']
190 Content-Type: [application/x-www-form-urlencoded]
191 User-Agent: [python-requests/2.18.4]
192 method: POST
193 uri: http://localhost:3000/api/v1/statuses
194 response:
195 body: {string: '{"id":"100465659647340884","created_at":"2018-07-30T20:58:28.602Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":null,"uri":"http://localhost:3000/users/admin/statuses/100465659647340884","content":"\u003cp\u003eGirugamesh!\u003c/p\u003e","url":"http://localhost:3000/@admin/100465659647340884","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Mastodon.py
196 test suite","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"created_at":"2018-07-13T19:35:33.303Z","note":"\u003cp\u003e\u003c/p\u003e","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":1,"following_count":0,"statuses_count":79,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]}'}
197 headers:
198 Cache-Control: ['max-age=0, private, must-revalidate']
199 Content-Type: [application/json; charset=utf-8]
200 ETag: [W/"256bf872aa68fca68067fd604bf9a1a1"]
201 Referrer-Policy: [strict-origin-when-cross-origin]
202 Transfer-Encoding: [chunked]
203 Vary: ['Accept-Encoding, Origin']
204 X-Content-Type-Options: [nosniff]
205 X-Download-Options: [noopen]
206 X-Frame-Options: [SAMEORIGIN]
207 X-Permitted-Cross-Domain-Policies: [none]
208 X-Request-Id: [ca302493-b258-44e5-8ffe-f52ef81e5172]
209 X-Runtime: ['0.214470']
210 X-XSS-Protection: [1; mode=block]
211 content-length: ['1171']
212 status: {code: 200, message: OK}
213- request:
214 body: status=Girugameshnetworking%21
215 headers:
216 Accept: ['*/*']
217 Accept-Encoding: ['gzip, deflate']
218 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN_2]
219 Connection: [keep-alive]
220 Content-Length: ['30']
221 Content-Type: [application/x-www-form-urlencoded]
222 User-Agent: [python-requests/2.18.4]
223 method: POST
224 uri: http://localhost:3000/api/v1/statuses
225 response:
226 body: {string: '{"id":"100465659662509605","created_at":"2018-07-30T20:58:28.837Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"no","uri":"http://localhost:3000/users/admin/statuses/100465659662509605","content":"\u003cp\u003eGirugameshnetworking!\u003c/p\u003e","url":"http://localhost:3000/@admin/100465659662509605","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Mastodon.py
227 test suite","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"created_at":"2018-07-13T19:35:33.303Z","note":"\u003cp\u003e\u003c/p\u003e","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":1,"following_count":0,"statuses_count":80,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]}'}
228 headers:
229 Cache-Control: ['max-age=0, private, must-revalidate']
230 Content-Type: [application/json; charset=utf-8]
231 ETag: [W/"d12f50e6c8fe6f3d5ff8b4997b2a918c"]
232 Referrer-Policy: [strict-origin-when-cross-origin]
233 Transfer-Encoding: [chunked]
234 Vary: ['Accept-Encoding, Origin']
235 X-Content-Type-Options: [nosniff]
236 X-Download-Options: [noopen]
237 X-Frame-Options: [SAMEORIGIN]
238 X-Permitted-Cross-Domain-Policies: [none]
239 X-Request-Id: [48bf60d9-ab71-4b1e-8f2f-00a33f3ae98a]
240 X-Runtime: ['0.215613']
241 X-XSS-Protection: [1; mode=block]
242 content-length: ['1181']
243 status: {code: 200, message: OK}
244- request:
245 body: status=I+love+japanimation%21
246 headers:
247 Accept: ['*/*']
248 Accept-Encoding: ['gzip, deflate']
249 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN_2]
250 Connection: [keep-alive]
251 Content-Length: ['29']
252 Content-Type: [application/x-www-form-urlencoded]
253 User-Agent: [python-requests/2.18.4]
254 method: POST
255 uri: http://localhost:3000/api/v1/statuses
256 response:
257 body: {string: '{"id":"100465659679228554","created_at":"2018-07-30T20:58:29.096Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":null,"uri":"http://localhost:3000/users/admin/statuses/100465659679228554","content":"\u003cp\u003eI
258 love japanimation!\u003c/p\u003e","url":"http://localhost:3000/@admin/100465659679228554","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Mastodon.py
259 test suite","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"created_at":"2018-07-13T19:35:33.303Z","note":"\u003cp\u003e\u003c/p\u003e","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":1,"following_count":0,"statuses_count":81,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]}'}
260 headers:
261 Cache-Control: ['max-age=0, private, must-revalidate']
262 Content-Type: [application/json; charset=utf-8]
263 ETag: [W/"7b8ed89d96e6f4b0c6804e57815f9fa8"]
264 Referrer-Policy: [strict-origin-when-cross-origin]
265 Transfer-Encoding: [chunked]
266 Vary: ['Accept-Encoding, Origin']
267 X-Content-Type-Options: [nosniff]
268 X-Download-Options: [noopen]
269 X-Frame-Options: [SAMEORIGIN]
270 X-Permitted-Cross-Domain-Policies: [none]
271 X-Request-Id: [939ec625-5dd3-40aa-90be-f6f898241c95]
272 X-Runtime: ['0.258094']
273 X-XSS-Protection: [1; mode=block]
274 content-length: ['1180']
275 status: {code: 200, message: OK}
276- request:
277 body: null
278 headers:
279 Accept: ['*/*']
280 Accept-Encoding: ['gzip, deflate']
281 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
282 Connection: [keep-alive]
283 User-Agent: [python-requests/2.18.4]
284 method: GET
285 uri: http://localhost:3000/api/v1/timelines/home
286 response:
287 body: {string: '[{"id":"100465659679228554","created_at":"2018-07-30T20:58:29.096Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":null,"uri":"http://localhost:3000/users/admin/statuses/100465659679228554","content":"\u003cp\u003eI
288 love japanimation!\u003c/p\u003e","url":"http://localhost:3000/@admin/100465659679228554","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"reblog":null,"application":{"name":"Mastodon.py
289 test suite","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"created_at":"2018-07-13T19:35:33.303Z","note":"\u003cp\u003e\u003c/p\u003e","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":1,"following_count":0,"statuses_count":81,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"100465659662509605","created_at":"2018-07-30T20:58:28.837Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"no","uri":"http://localhost:3000/users/admin/statuses/100465659662509605","content":"\u003cp\u003eGirugameshnetworking!\u003c/p\u003e","url":"http://localhost:3000/@admin/100465659662509605","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"reblog":null,"application":{"name":"Mastodon.py
290 test suite","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"created_at":"2018-07-13T19:35:33.303Z","note":"\u003cp\u003e\u003c/p\u003e","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":1,"following_count":0,"statuses_count":81,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"100465659647340884","created_at":"2018-07-30T20:58:28.602Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":null,"uri":"http://localhost:3000/users/admin/statuses/100465659647340884","content":"\u003cp\u003eGirugamesh!\u003c/p\u003e","url":"http://localhost:3000/@admin/100465659647340884","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"reblog":null,"application":{"name":"Mastodon.py
291 test suite","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"created_at":"2018-07-13T19:35:33.303Z","note":"\u003cp\u003e\u003c/p\u003e","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":1,"following_count":0,"statuses_count":81,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"100465659631900327","created_at":"2018-07-30T20:58:28.365Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":null,"uri":"http://localhost:3000/users/admin/statuses/100465659631900327","content":"\u003cp\u003eI
292 love animes\u003c/p\u003e","url":"http://localhost:3000/@admin/100465659631900327","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"reblog":null,"application":{"name":"Mastodon.py
293 test suite","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"created_at":"2018-07-13T19:35:33.303Z","note":"\u003cp\u003e\u003c/p\u003e","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":1,"following_count":0,"statuses_count":81,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"100465559679402754","created_at":"2018-07-30T20:33:03.214Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":null,"uri":"http://localhost:3000/users/admin/statuses/100465559679402754","content":"\u003cp\u003eI
294 love japanimation!\u003c/p\u003e","url":"http://localhost:3000/@admin/100465559679402754","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"reblog":null,"application":{"name":"Mastodon.py
295 test suite","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"created_at":"2018-07-13T19:35:33.303Z","note":"\u003cp\u003e\u003c/p\u003e","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":1,"following_count":0,"statuses_count":81,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"100465559659485435","created_at":"2018-07-30T20:33:02.930Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"no","uri":"http://localhost:3000/users/admin/statuses/100465559659485435","content":"\u003cp\u003eGirugameshnetworking!\u003c/p\u003e","url":"http://localhost:3000/@admin/100465559659485435","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"reblog":null,"application":{"name":"Mastodon.py
296 test suite","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"created_at":"2018-07-13T19:35:33.303Z","note":"\u003cp\u003e\u003c/p\u003e","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":1,"following_count":0,"statuses_count":81,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"100465559616321413","created_at":"2018-07-30T20:33:02.275Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":null,"uri":"http://localhost:3000/users/admin/statuses/100465559616321413","content":"\u003cp\u003eI
297 love animes\u003c/p\u003e","url":"http://localhost:3000/@admin/100465559616321413","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"reblog":null,"application":{"name":"Mastodon.py
298 test suite","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"created_at":"2018-07-13T19:35:33.303Z","note":"\u003cp\u003e\u003c/p\u003e","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":1,"following_count":0,"statuses_count":81,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"100369878639416248","created_at":"2018-07-13T23:00:06.400Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"fy","uri":"http://localhost:3000/users/mastodonpy_test/statuses/100369878639416248","content":"\u003cp\u003eit\u0026apos;s
299 cool guy\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test/100369878639416248","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Mastodon.py
300 test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"John
301 Lennon","locked":true,"bot":false,"created_at":"2018-07-13T23:02:25.260Z","note":"\u003cp\u003eI
302 walk funny\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/system/accounts/avatars/123/456/789/012/345/original/mastodonpyupload_.jpeg","avatar_static":"http://localhost:3000/system/accounts/avatars/123/456/789/012/345/original/mastodonpyupload_.jpeg","header":"http://localhost:3000/system/accounts/headers/123/456/789/012/345/original/mastodonpyupload_.jpeg","header_static":"http://localhost:3000/system/accounts/headers/123/456/789/012/345/original/mastodonpyupload_.jpeg","followers_count":0,"following_count":1,"statuses_count":90,"emojis":[],"fields":[{"name":"bread","value":"toasty."},{"name":"lasagna","value":"no!!!"}]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"100369876256619444","created_at":"2018-07-13T22:59:30.057Z","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/100369876256619444","content":"\u003cp\u003eon
303 the internet, nobody knows you\u0026apos;re a plane\u003c/p\u003e","url":"http://localhost:3000/@admin/100369876256619444","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"reblog":null,"application":{"name":"Mastodon.py
304 test suite","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"created_at":"2018-07-13T19:35:33.303Z","note":"\u003cp\u003e\u003c/p\u003e","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":1,"following_count":0,"statuses_count":81,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"100369876236168049","created_at":"2018-07-13T22:59:29.744Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":null,"uri":"http://localhost:3000/users/admin/statuses/100369876236168049","content":"\u003cp\u003e\u003cspan
305 class=\"h-card\"\u003e\u003ca href=\"http://localhost:3000/@mastodonpy_test\"
306 class=\"u-url mention\"\u003e@\u003cspan\u003emastodonpy_test\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e
307 beep beep I\u0026apos;m a jeep\u003c/p\u003e","url":"http://localhost:3000/@admin/100369876236168049","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"reblog":null,"application":{"name":"Mastodon.py
308 test suite","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"created_at":"2018-07-13T19:35:33.303Z","note":"\u003cp\u003e\u003c/p\u003e","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":1,"following_count":0,"statuses_count":81,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[{"id":"1234567890123456","username":"mastodonpy_test","url":"http://localhost:3000/@mastodonpy_test","acct":"mastodonpy_test"}],"tags":[],"emojis":[]},{"id":"100369866131840990","created_at":"2018-07-13T22:56:55.551Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"fy","uri":"http://localhost:3000/users/mastodonpy_test/statuses/100369866131840990","content":"\u003cp\u003eit\u0026apos;s
309 cool guy\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test/100369866131840990","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Mastodon.py
310 test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"John
311 Lennon","locked":true,"bot":false,"created_at":"2018-07-13T23:02:25.260Z","note":"\u003cp\u003eI
312 walk funny\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/system/accounts/avatars/123/456/789/012/345/original/mastodonpyupload_.jpeg","avatar_static":"http://localhost:3000/system/accounts/avatars/123/456/789/012/345/original/mastodonpyupload_.jpeg","header":"http://localhost:3000/system/accounts/headers/123/456/789/012/345/original/mastodonpyupload_.jpeg","header_static":"http://localhost:3000/system/accounts/headers/123/456/789/012/345/original/mastodonpyupload_.jpeg","followers_count":0,"following_count":1,"statuses_count":90,"emojis":[],"fields":[{"name":"bread","value":"toasty."},{"name":"lasagna","value":"no!!!"}]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"100369864730374084","created_at":"2018-07-13T22:56:34.197Z","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/100369864730374084","content":"\u003cp\u003eon
313 the internet, nobody knows you\u0026apos;re a plane\u003c/p\u003e","url":"http://localhost:3000/@admin/100369864730374084","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"reblog":null,"application":{"name":"Mastodon.py
314 test suite","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"created_at":"2018-07-13T19:35:33.303Z","note":"\u003cp\u003e\u003c/p\u003e","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":1,"following_count":0,"statuses_count":81,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"100369864711152431","created_at":"2018-07-13T22:56:33.885Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":null,"uri":"http://localhost:3000/users/admin/statuses/100369864711152431","content":"\u003cp\u003e\u003cspan
315 class=\"h-card\"\u003e\u003ca href=\"http://localhost:3000/@mastodonpy_test\"
316 class=\"u-url mention\"\u003e@\u003cspan\u003emastodonpy_test\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e
317 beep beep I\u0026apos;m a jeep\u003c/p\u003e","url":"http://localhost:3000/@admin/100369864711152431","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"reblog":null,"application":{"name":"Mastodon.py
318 test suite","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"created_at":"2018-07-13T19:35:33.303Z","note":"\u003cp\u003e\u003c/p\u003e","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":1,"following_count":0,"statuses_count":81,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[{"id":"1234567890123456","username":"mastodonpy_test","url":"http://localhost:3000/@mastodonpy_test","acct":"mastodonpy_test"}],"tags":[],"emojis":[]},{"id":"100369861426964675","created_at":"2018-07-13T22:55:43.756Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"fy","uri":"http://localhost:3000/users/mastodonpy_test/statuses/100369861426964675","content":"\u003cp\u003eit\u0026apos;s
319 cool guy\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test/100369861426964675","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Mastodon.py
320 test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"John
321 Lennon","locked":true,"bot":false,"created_at":"2018-07-13T23:02:25.260Z","note":"\u003cp\u003eI
322 walk funny\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/system/accounts/avatars/123/456/789/012/345/original/mastodonpyupload_.jpeg","avatar_static":"http://localhost:3000/system/accounts/avatars/123/456/789/012/345/original/mastodonpyupload_.jpeg","header":"http://localhost:3000/system/accounts/headers/123/456/789/012/345/original/mastodonpyupload_.jpeg","header_static":"http://localhost:3000/system/accounts/headers/123/456/789/012/345/original/mastodonpyupload_.jpeg","followers_count":0,"following_count":1,"statuses_count":90,"emojis":[],"fields":[{"name":"bread","value":"toasty."},{"name":"lasagna","value":"no!!!"}]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"100369860025045082","created_at":"2018-07-13T22:55:22.399Z","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/100369860025045082","content":"\u003cp\u003eon
323 the internet, nobody knows you\u0026apos;re a plane\u003c/p\u003e","url":"http://localhost:3000/@admin/100369860025045082","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"reblog":null,"application":{"name":"Mastodon.py
324 test suite","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"created_at":"2018-07-13T19:35:33.303Z","note":"\u003cp\u003e\u003c/p\u003e","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":1,"following_count":0,"statuses_count":81,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"100369860006737049","created_at":"2018-07-13T22:55:22.102Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":null,"uri":"http://localhost:3000/users/admin/statuses/100369860006737049","content":"\u003cp\u003e\u003cspan
325 class=\"h-card\"\u003e\u003ca href=\"http://localhost:3000/@mastodonpy_test\"
326 class=\"u-url mention\"\u003e@\u003cspan\u003emastodonpy_test\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e
327 beep beep I\u0026apos;m a jeep\u003c/p\u003e","url":"http://localhost:3000/@admin/100369860006737049","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"reblog":null,"application":{"name":"Mastodon.py
328 test suite","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"created_at":"2018-07-13T19:35:33.303Z","note":"\u003cp\u003e\u003c/p\u003e","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":1,"following_count":0,"statuses_count":81,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[{"id":"1234567890123456","username":"mastodonpy_test","url":"http://localhost:3000/@mastodonpy_test","acct":"mastodonpy_test"}],"tags":[],"emojis":[]},{"id":"100369855289558259","created_at":"2018-07-13T22:54:10.107Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"fy","uri":"http://localhost:3000/users/mastodonpy_test/statuses/100369855289558259","content":"\u003cp\u003eit\u0026apos;s
329 cool guy\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test/100369855289558259","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Mastodon.py
330 test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"John
331 Lennon","locked":true,"bot":false,"created_at":"2018-07-13T23:02:25.260Z","note":"\u003cp\u003eI
332 walk funny\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/system/accounts/avatars/123/456/789/012/345/original/mastodonpyupload_.jpeg","avatar_static":"http://localhost:3000/system/accounts/avatars/123/456/789/012/345/original/mastodonpyupload_.jpeg","header":"http://localhost:3000/system/accounts/headers/123/456/789/012/345/original/mastodonpyupload_.jpeg","header_static":"http://localhost:3000/system/accounts/headers/123/456/789/012/345/original/mastodonpyupload_.jpeg","followers_count":0,"following_count":1,"statuses_count":90,"emojis":[],"fields":[{"name":"bread","value":"toasty."},{"name":"lasagna","value":"no!!!"}]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"100369853882920137","created_at":"2018-07-13T22:53:48.742Z","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/100369853882920137","content":"\u003cp\u003eon
333 the internet, nobody knows you\u0026apos;re a plane\u003c/p\u003e","url":"http://localhost:3000/@admin/100369853882920137","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"reblog":null,"application":{"name":"Mastodon.py
334 test suite","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"created_at":"2018-07-13T19:35:33.303Z","note":"\u003cp\u003e\u003c/p\u003e","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":1,"following_count":0,"statuses_count":81,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"100369853862414186","created_at":"2018-07-13T22:53:48.345Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":null,"uri":"http://localhost:3000/users/admin/statuses/100369853862414186","content":"\u003cp\u003e\u003cspan
335 class=\"h-card\"\u003e\u003ca href=\"http://localhost:3000/@mastodonpy_test\"
336 class=\"u-url mention\"\u003e@\u003cspan\u003emastodonpy_test\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e
337 beep beep I\u0026apos;m a jeep\u003c/p\u003e","url":"http://localhost:3000/@admin/100369853862414186","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"reblog":null,"application":{"name":"Mastodon.py
338 test suite","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"created_at":"2018-07-13T19:35:33.303Z","note":"\u003cp\u003e\u003c/p\u003e","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":1,"following_count":0,"statuses_count":81,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[{"id":"1234567890123456","username":"mastodonpy_test","url":"http://localhost:3000/@mastodonpy_test","acct":"mastodonpy_test"}],"tags":[],"emojis":[]},{"id":"100369852128654372","created_at":"2018-07-13T22:53:21.874Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"fy","uri":"http://localhost:3000/users/mastodonpy_test/statuses/100369852128654372","content":"\u003cp\u003eit\u0026apos;s
339 cool guy\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test/100369852128654372","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Mastodon.py
340 test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"John
341 Lennon","locked":true,"bot":false,"created_at":"2018-07-13T23:02:25.260Z","note":"\u003cp\u003eI
342 walk funny\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/system/accounts/avatars/123/456/789/012/345/original/mastodonpyupload_.jpeg","avatar_static":"http://localhost:3000/system/accounts/avatars/123/456/789/012/345/original/mastodonpyupload_.jpeg","header":"http://localhost:3000/system/accounts/headers/123/456/789/012/345/original/mastodonpyupload_.jpeg","header_static":"http://localhost:3000/system/accounts/headers/123/456/789/012/345/original/mastodonpyupload_.jpeg","followers_count":0,"following_count":1,"statuses_count":90,"emojis":[],"fields":[{"name":"bread","value":"toasty."},{"name":"lasagna","value":"no!!!"}]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]}]'}
343 headers:
344 Cache-Control: ['max-age=0, private, must-revalidate']
345 Content-Type: [application/json; charset=utf-8]
346 ETag: [W/"8e545518c5ef3eafada6e5d037f09434"]
347 Link: ['<http://localhost:3000/api/v1/timelines/home?max_id=100369852128654372>;
348 rel="next", <http://localhost:3000/api/v1/timelines/home?since_id=100465659679228554>;
349 rel="prev"']
350 Referrer-Policy: [strict-origin-when-cross-origin]
351 Transfer-Encoding: [chunked]
352 Vary: ['Accept-Encoding, Origin']
353 X-Content-Type-Options: [nosniff]
354 X-Download-Options: [noopen]
355 X-Frame-Options: [SAMEORIGIN]
356 X-Permitted-Cross-Domain-Policies: [none]
357 X-Request-Id: [47182337-9b1d-458c-9011-a20ab605cc39]
358 X-Runtime: ['0.294831']
359 X-XSS-Protection: [1; mode=block]
360 content-length: ['26586']
361 status: {code: 200, message: OK}
362- request:
363 body: null
364 headers:
365 Accept: ['*/*']
366 Accept-Encoding: ['gzip, deflate']
367 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
368 Connection: [keep-alive]
369 Content-Length: ['0']
370 User-Agent: [python-requests/2.18.4]
371 method: DELETE
372 uri: http://localhost:3000/api/v1/filters/24
373 response:
374 body: {string: '{}'}
375 headers:
376 Cache-Control: ['max-age=0, private, must-revalidate']
377 Content-Type: [application/json; charset=utf-8]
378 ETag: [W/"f23e62d6758c16d7847b85d2dd34d044"]
379 Referrer-Policy: [strict-origin-when-cross-origin]
380 Transfer-Encoding: [chunked]
381 Vary: ['Accept-Encoding, Origin']
382 X-Content-Type-Options: [nosniff]
383 X-Download-Options: [noopen]
384 X-Frame-Options: [SAMEORIGIN]
385 X-Permitted-Cross-Domain-Policies: [none]
386 X-Request-Id: [6742b8b5-955c-4e39-bfa0-a60316ff98be]
387 X-Runtime: ['0.038607']
388 X-XSS-Protection: [1; mode=block]
389 content-length: ['2']
390 status: {code: 200, message: OK}
391- request:
392 body: null
393 headers:
394 Accept: ['*/*']
395 Accept-Encoding: ['gzip, deflate']
396 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
397 Connection: [keep-alive]
398 Content-Length: ['0']
399 User-Agent: [python-requests/2.18.4]
400 method: DELETE
401 uri: http://localhost:3000/api/v1/filters/25
402 response:
403 body: {string: '{}'}
404 headers:
405 Cache-Control: ['max-age=0, private, must-revalidate']
406 Content-Type: [application/json; charset=utf-8]
407 ETag: [W/"f23e62d6758c16d7847b85d2dd34d044"]
408 Referrer-Policy: [strict-origin-when-cross-origin]
409 Transfer-Encoding: [chunked]
410 Vary: ['Accept-Encoding, Origin']
411 X-Content-Type-Options: [nosniff]
412 X-Download-Options: [noopen]
413 X-Frame-Options: [SAMEORIGIN]
414 X-Permitted-Cross-Domain-Policies: [none]
415 X-Request-Id: [fc848d17-a24b-4de4-b24b-1acd536ef3f6]
416 X-Runtime: ['0.027986']
417 X-XSS-Protection: [1; mode=block]
418 content-length: ['2']
419 status: {code: 200, message: OK}
420- request:
421 body: null
422 headers:
423 Accept: ['*/*']
424 Accept-Encoding: ['gzip, deflate']
425 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
426 Connection: [keep-alive]
427 Content-Length: ['0']
428 User-Agent: [python-requests/2.18.4]
429 method: DELETE
430 uri: http://localhost:3000/api/v1/filters/26
431 response:
432 body: {string: '{}'}
433 headers:
434 Cache-Control: ['max-age=0, private, must-revalidate']
435 Content-Type: [application/json; charset=utf-8]
436 ETag: [W/"f23e62d6758c16d7847b85d2dd34d044"]
437 Referrer-Policy: [strict-origin-when-cross-origin]
438 Transfer-Encoding: [chunked]
439 Vary: ['Accept-Encoding, Origin']
440 X-Content-Type-Options: [nosniff]
441 X-Download-Options: [noopen]
442 X-Frame-Options: [SAMEORIGIN]
443 X-Permitted-Cross-Domain-Policies: [none]
444 X-Request-Id: [b98a2e02-5ddc-4935-a471-0fe3038dc808]
445 X-Runtime: ['0.025733']
446 X-XSS-Protection: [1; mode=block]
447 content-length: ['2']
448 status: {code: 200, message: OK}
449- request:
450 body: null
451 headers:
452 Accept: ['*/*']
453 Accept-Encoding: ['gzip, deflate']
454 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN_2]
455 Connection: [keep-alive]
456 Content-Length: ['0']
457 User-Agent: [python-requests/2.18.4]
458 method: DELETE
459 uri: http://localhost:3000/api/v1/statuses/100465659631900327
460 response:
461 body: {string: '{}'}
462 headers:
463 Cache-Control: ['max-age=0, private, must-revalidate']
464 Content-Type: [application/json; charset=utf-8]
465 ETag: [W/"f23e62d6758c16d7847b85d2dd34d044"]
466 Referrer-Policy: [strict-origin-when-cross-origin]
467 Transfer-Encoding: [chunked]
468 Vary: ['Accept-Encoding, Origin']
469 X-Content-Type-Options: [nosniff]
470 X-Download-Options: [noopen]
471 X-Frame-Options: [SAMEORIGIN]
472 X-Permitted-Cross-Domain-Policies: [none]
473 X-Request-Id: [5fe33695-d46a-4252-af76-00b4a586f7ef]
474 X-Runtime: ['0.030696']
475 X-XSS-Protection: [1; mode=block]
476 content-length: ['2']
477 status: {code: 200, message: OK}
478- request:
479 body: null
480 headers:
481 Accept: ['*/*']
482 Accept-Encoding: ['gzip, deflate']
483 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN_2]
484 Connection: [keep-alive]
485 Content-Length: ['0']
486 User-Agent: [python-requests/2.18.4]
487 method: DELETE
488 uri: http://localhost:3000/api/v1/statuses/100465659647340884
489 response:
490 body: {string: '{}'}
491 headers:
492 Cache-Control: ['max-age=0, private, must-revalidate']
493 Content-Type: [application/json; charset=utf-8]
494 ETag: [W/"f23e62d6758c16d7847b85d2dd34d044"]
495 Referrer-Policy: [strict-origin-when-cross-origin]
496 Transfer-Encoding: [chunked]
497 Vary: ['Accept-Encoding, Origin']
498 X-Content-Type-Options: [nosniff]
499 X-Download-Options: [noopen]
500 X-Frame-Options: [SAMEORIGIN]
501 X-Permitted-Cross-Domain-Policies: [none]
502 X-Request-Id: [a4ec6ec1-99e4-4395-b9ed-0f2e19c8669b]
503 X-Runtime: ['0.064158']
504 X-XSS-Protection: [1; mode=block]
505 content-length: ['2']
506 status: {code: 200, message: OK}
507- request:
508 body: null
509 headers:
510 Accept: ['*/*']
511 Accept-Encoding: ['gzip, deflate']
512 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN_2]
513 Connection: [keep-alive]
514 Content-Length: ['0']
515 User-Agent: [python-requests/2.18.4]
516 method: DELETE
517 uri: http://localhost:3000/api/v1/statuses/100465659662509605
518 response:
519 body: {string: '{}'}
520 headers:
521 Cache-Control: ['max-age=0, private, must-revalidate']
522 Content-Type: [application/json; charset=utf-8]
523 ETag: [W/"f23e62d6758c16d7847b85d2dd34d044"]
524 Referrer-Policy: [strict-origin-when-cross-origin]
525 Transfer-Encoding: [chunked]
526 Vary: ['Accept-Encoding, Origin']
527 X-Content-Type-Options: [nosniff]
528 X-Download-Options: [noopen]
529 X-Frame-Options: [SAMEORIGIN]
530 X-Permitted-Cross-Domain-Policies: [none]
531 X-Request-Id: [d9e9324c-1442-4767-a720-e28c33471bea]
532 X-Runtime: ['0.102234']
533 X-XSS-Protection: [1; mode=block]
534 content-length: ['2']
535 status: {code: 200, message: OK}
536- request:
537 body: null
538 headers:
539 Accept: ['*/*']
540 Accept-Encoding: ['gzip, deflate']
541 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN_2]
542 Connection: [keep-alive]
543 Content-Length: ['0']
544 User-Agent: [python-requests/2.18.4]
545 method: DELETE
546 uri: http://localhost:3000/api/v1/statuses/100465659679228554
547 response:
548 body: {string: '{}'}
549 headers:
550 Cache-Control: ['max-age=0, private, must-revalidate']
551 Content-Type: [application/json; charset=utf-8]
552 ETag: [W/"26b7fe38f7269e3355b0a1d438f70ca5"]
553 Referrer-Policy: [strict-origin-when-cross-origin]
554 Transfer-Encoding: [chunked]
555 Vary: ['Accept-Encoding, Origin']
556 X-Content-Type-Options: [nosniff]
557 X-Download-Options: [noopen]
558 X-Frame-Options: [SAMEORIGIN]
559 X-Permitted-Cross-Domain-Policies: [none]
560 X-Request-Id: [af0647e4-ef68-4ec3-828c-02f522b68461]
561 X-Runtime: ['0.098372']
562 X-XSS-Protection: [1; mode=block]
563 content-length: ['2']
564 status: {code: 200, message: OK}
565version: 1
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 @@
1interactions:
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}
232version: 1
diff --git a/tests/cassettes/test_filter_serverside.yaml b/tests/cassettes/test_filter_serverside.yaml
new file mode 100644
index 0000000..f91e8be
--- /dev/null
+++ b/tests/cassettes/test_filter_serverside.yaml
@@ -0,0 +1,596 @@
1interactions:
2- request:
3 body: null
4 headers:
5 Accept: ['*/*']
6 Accept-Encoding: ['gzip, deflate']
7 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN_2]
8 Connection: [keep-alive]
9 User-Agent: [python-requests/2.18.4]
10 method: GET
11 uri: http://localhost:3000/api/v1/accounts/verify_credentials
12 response:
13 body: {string: '{"id":"1","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"created_at":"2018-07-13T19:35:33.303Z","note":"\u003cp\u003e\u003c/p\u003e","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":1,"following_count":0,"statuses_count":76,"source":{"privacy":"public","sensitive":false,"language":null,"note":"","fields":[]},"emojis":[],"fields":[]}'}
14 headers:
15 Cache-Control: ['max-age=0, private, must-revalidate']
16 Content-Type: [application/json; charset=utf-8]
17 ETag: [W/"7d31477e3c003b98b327cdea7fbc7cef"]
18 Referrer-Policy: [strict-origin-when-cross-origin]
19 Transfer-Encoding: [chunked]
20 Vary: ['Accept-Encoding, Origin']
21 X-Content-Type-Options: [nosniff]
22 X-Download-Options: [noopen]
23 X-Frame-Options: [SAMEORIGIN]
24 X-Permitted-Cross-Domain-Policies: [none]
25 X-Request-Id: [4e940740-5a95-4cdd-97fb-1f1f3e946957]
26 X-Runtime: ['0.022541']
27 X-XSS-Protection: [1; mode=block]
28 content-length: ['635']
29 status: {code: 200, message: OK}
30- request:
31 body: reblogs=1&id=1
32 headers:
33 Accept: ['*/*']
34 Accept-Encoding: ['gzip, deflate']
35 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
36 Connection: [keep-alive]
37 Content-Length: ['14']
38 Content-Type: [application/x-www-form-urlencoded]
39 User-Agent: [python-requests/2.18.4]
40 method: POST
41 uri: http://localhost:3000/api/v1/accounts/1/follow
42 response:
43 body: {string: '{"id":"1","following":true,"showing_reblogs":true,"followed_by":false,"blocking":false,"muting":false,"muting_notifications":false,"requested":false,"domain_blocking":false}'}
44 headers:
45 Cache-Control: ['max-age=0, private, must-revalidate']
46 Content-Type: [application/json; charset=utf-8]
47 ETag: [W/"af9693e285cb53d7413ffb40aa2a72f9"]
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: [39899d30-4adc-4d8f-a218-e82195b32dbc]
56 X-Runtime: ['0.056812']
57 X-XSS-Protection: [1; mode=block]
58 content-length: ['173']
59 status: {code: 200, message: OK}
60- request:
61 body: whole_word=0&irreversible=1&phrase=anime&context%5B%5D=home
62 headers:
63 Accept: ['*/*']
64 Accept-Encoding: ['gzip, deflate']
65 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
66 Connection: [keep-alive]
67 Content-Length: ['59']
68 Content-Type: [application/x-www-form-urlencoded]
69 User-Agent: [python-requests/2.18.4]
70 method: POST
71 uri: http://localhost:3000/api/v1/filters
72 response:
73 body: {string: '{"id":21,"phrase":"anime","context":["home"],"whole_word":false,"expires_at":null,"irreversible":true}'}
74 headers:
75 Cache-Control: ['max-age=0, private, must-revalidate']
76 Content-Type: [application/json; charset=utf-8]
77 ETag: [W/"8a5026688e50308279031a9d7f5fd768"]
78 Referrer-Policy: [strict-origin-when-cross-origin]
79 Transfer-Encoding: [chunked]
80 Vary: ['Accept-Encoding, Origin']
81 X-Content-Type-Options: [nosniff]
82 X-Download-Options: [noopen]
83 X-Frame-Options: [SAMEORIGIN]
84 X-Permitted-Cross-Domain-Policies: [none]
85 X-Request-Id: [a62a7f63-a4ed-4a14-9dc3-4c65cbc621ce]
86 X-Runtime: ['0.035387']
87 X-XSS-Protection: [1; mode=block]
88 content-length: ['102']
89 status: {code: 200, message: OK}
90- request:
91 body: whole_word=1&irreversible=1&phrase=girugamesh&context%5B%5D=home
92 headers:
93 Accept: ['*/*']
94 Accept-Encoding: ['gzip, deflate']
95 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
96 Connection: [keep-alive]
97 Content-Length: ['64']
98 Content-Type: [application/x-www-form-urlencoded]
99 User-Agent: [python-requests/2.18.4]
100 method: POST
101 uri: http://localhost:3000/api/v1/filters
102 response:
103 body: {string: '{"id":22,"phrase":"girugamesh","context":["home"],"whole_word":true,"expires_at":null,"irreversible":true}'}
104 headers:
105 Cache-Control: ['max-age=0, private, must-revalidate']
106 Content-Type: [application/json; charset=utf-8]
107 ETag: [W/"79725e5b9fea77da4edd197f187193e7"]
108 Referrer-Policy: [strict-origin-when-cross-origin]
109 Transfer-Encoding: [chunked]
110 Vary: ['Accept-Encoding, Origin']
111 X-Content-Type-Options: [nosniff]
112 X-Download-Options: [noopen]
113 X-Frame-Options: [SAMEORIGIN]
114 X-Permitted-Cross-Domain-Policies: [none]
115 X-Request-Id: [6888b95e-8d56-4577-a478-1a5c9f04f157]
116 X-Runtime: ['0.024879']
117 X-XSS-Protection: [1; mode=block]
118 content-length: ['106']
119 status: {code: 200, message: OK}
120- request:
121 body: whole_word=1&irreversible=1&phrase=japanimation&context%5B%5D=notifications
122 headers:
123 Accept: ['*/*']
124 Accept-Encoding: ['gzip, deflate']
125 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
126 Connection: [keep-alive]
127 Content-Length: ['75']
128 Content-Type: [application/x-www-form-urlencoded]
129 User-Agent: [python-requests/2.18.4]
130 method: POST
131 uri: http://localhost:3000/api/v1/filters
132 response:
133 body: {string: '{"id":23,"phrase":"japanimation","context":["notifications"],"whole_word":true,"expires_at":null,"irreversible":true}'}
134 headers:
135 Cache-Control: ['max-age=0, private, must-revalidate']
136 Content-Type: [application/json; charset=utf-8]
137 ETag: [W/"cd017d68e7db4d81e76399dd00bda124"]
138 Referrer-Policy: [strict-origin-when-cross-origin]
139 Transfer-Encoding: [chunked]
140 Vary: ['Accept-Encoding, Origin']
141 X-Content-Type-Options: [nosniff]
142 X-Download-Options: [noopen]
143 X-Frame-Options: [SAMEORIGIN]
144 X-Permitted-Cross-Domain-Policies: [none]
145 X-Request-Id: [fc52d073-2b2a-48a8-8485-f7b1ce6af831]
146 X-Runtime: ['0.032462']
147 X-XSS-Protection: [1; mode=block]
148 content-length: ['117']
149 status: {code: 200, message: OK}
150- request:
151 body: status=I+love+animes
152 headers:
153 Accept: ['*/*']
154 Accept-Encoding: ['gzip, deflate']
155 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN_2]
156 Connection: [keep-alive]
157 Content-Length: ['20']
158 Content-Type: [application/x-www-form-urlencoded]
159 User-Agent: [python-requests/2.18.4]
160 method: POST
161 uri: http://localhost:3000/api/v1/statuses
162 response:
163 body: {string: '{"id":"100465649501974043","created_at":"2018-07-30T20:55:53.793Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":null,"uri":"http://localhost:3000/users/admin/statuses/100465649501974043","content":"\u003cp\u003eI
164 love animes\u003c/p\u003e","url":"http://localhost:3000/@admin/100465649501974043","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Mastodon.py
165 test suite","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"created_at":"2018-07-13T19:35:33.303Z","note":"\u003cp\u003e\u003c/p\u003e","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":1,"following_count":0,"statuses_count":77,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]}'}
166 headers:
167 Cache-Control: ['max-age=0, private, must-revalidate']
168 Content-Type: [application/json; charset=utf-8]
169 ETag: [W/"90d140d0d39d12026c6e2fe8fd186355"]
170 Referrer-Policy: [strict-origin-when-cross-origin]
171 Transfer-Encoding: [chunked]
172 Vary: ['Accept-Encoding, Origin']
173 X-Content-Type-Options: [nosniff]
174 X-Download-Options: [noopen]
175 X-Frame-Options: [SAMEORIGIN]
176 X-Permitted-Cross-Domain-Policies: [none]
177 X-Request-Id: [830dff13-2055-4bbe-b533-771e93966188]
178 X-Runtime: ['0.219262']
179 X-XSS-Protection: [1; mode=block]
180 content-length: ['1173']
181 status: {code: 200, message: OK}
182- request:
183 body: status=Girugamesh%21
184 headers:
185 Accept: ['*/*']
186 Accept-Encoding: ['gzip, deflate']
187 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN_2]
188 Connection: [keep-alive]
189 Content-Length: ['20']
190 Content-Type: [application/x-www-form-urlencoded]
191 User-Agent: [python-requests/2.18.4]
192 method: POST
193 uri: http://localhost:3000/api/v1/statuses
194 response:
195 body: {string: '{"id":"100465649520177606","created_at":"2018-07-30T20:55:54.070Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":null,"uri":"http://localhost:3000/users/admin/statuses/100465649520177606","content":"\u003cp\u003eGirugamesh!\u003c/p\u003e","url":"http://localhost:3000/@admin/100465649520177606","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Mastodon.py
196 test suite","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"created_at":"2018-07-13T19:35:33.303Z","note":"\u003cp\u003e\u003c/p\u003e","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":1,"following_count":0,"statuses_count":78,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]}'}
197 headers:
198 Cache-Control: ['max-age=0, private, must-revalidate']
199 Content-Type: [application/json; charset=utf-8]
200 ETag: [W/"8eaeb2e73eb75b8b14596336f58d8031"]
201 Referrer-Policy: [strict-origin-when-cross-origin]
202 Transfer-Encoding: [chunked]
203 Vary: ['Accept-Encoding, Origin']
204 X-Content-Type-Options: [nosniff]
205 X-Download-Options: [noopen]
206 X-Frame-Options: [SAMEORIGIN]
207 X-Permitted-Cross-Domain-Policies: [none]
208 X-Request-Id: [e4c7efeb-ff59-4bb6-950e-32b2d4b192a0]
209 X-Runtime: ['0.228315']
210 X-XSS-Protection: [1; mode=block]
211 content-length: ['1171']
212 status: {code: 200, message: OK}
213- request:
214 body: status=Girugameshnetworking%21
215 headers:
216 Accept: ['*/*']
217 Accept-Encoding: ['gzip, deflate']
218 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN_2]
219 Connection: [keep-alive]
220 Content-Length: ['30']
221 Content-Type: [application/x-www-form-urlencoded]
222 User-Agent: [python-requests/2.18.4]
223 method: POST
224 uri: http://localhost:3000/api/v1/statuses
225 response:
226 body: {string: '{"id":"100465649535137735","created_at":"2018-07-30T20:55:54.300Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"no","uri":"http://localhost:3000/users/admin/statuses/100465649535137735","content":"\u003cp\u003eGirugameshnetworking!\u003c/p\u003e","url":"http://localhost:3000/@admin/100465649535137735","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Mastodon.py
227 test suite","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"created_at":"2018-07-13T19:35:33.303Z","note":"\u003cp\u003e\u003c/p\u003e","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":1,"following_count":0,"statuses_count":79,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]}'}
228 headers:
229 Cache-Control: ['max-age=0, private, must-revalidate']
230 Content-Type: [application/json; charset=utf-8]
231 ETag: [W/"f1f8ea73af1216687439c55d4be1d450"]
232 Referrer-Policy: [strict-origin-when-cross-origin]
233 Transfer-Encoding: [chunked]
234 Vary: ['Accept-Encoding, Origin']
235 X-Content-Type-Options: [nosniff]
236 X-Download-Options: [noopen]
237 X-Frame-Options: [SAMEORIGIN]
238 X-Permitted-Cross-Domain-Policies: [none]
239 X-Request-Id: [9db24880-0ffc-49ef-b93b-cc7717e59c70]
240 X-Runtime: ['0.210997']
241 X-XSS-Protection: [1; mode=block]
242 content-length: ['1181']
243 status: {code: 200, message: OK}
244- request:
245 body: status=I+love+japanimation%21
246 headers:
247 Accept: ['*/*']
248 Accept-Encoding: ['gzip, deflate']
249 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN_2]
250 Connection: [keep-alive]
251 Content-Length: ['29']
252 Content-Type: [application/x-www-form-urlencoded]
253 User-Agent: [python-requests/2.18.4]
254 method: POST
255 uri: http://localhost:3000/api/v1/statuses
256 response:
257 body: {string: '{"id":"100465649550538157","created_at":"2018-07-30T20:55:54.539Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":null,"uri":"http://localhost:3000/users/admin/statuses/100465649550538157","content":"\u003cp\u003eI
258 love japanimation!\u003c/p\u003e","url":"http://localhost:3000/@admin/100465649550538157","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Mastodon.py
259 test suite","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"created_at":"2018-07-13T19:35:33.303Z","note":"\u003cp\u003e\u003c/p\u003e","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":1,"following_count":0,"statuses_count":80,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]}'}
260 headers:
261 Cache-Control: ['max-age=0, private, must-revalidate']
262 Content-Type: [application/json; charset=utf-8]
263 ETag: [W/"8bb0f4829f1c26f85f4b770f828c46cd"]
264 Referrer-Policy: [strict-origin-when-cross-origin]
265 Transfer-Encoding: [chunked]
266 Vary: ['Accept-Encoding, Origin']
267 X-Content-Type-Options: [nosniff]
268 X-Download-Options: [noopen]
269 X-Frame-Options: [SAMEORIGIN]
270 X-Permitted-Cross-Domain-Policies: [none]
271 X-Request-Id: [a415939b-ac7e-45e9-8779-f985eaf3b11b]
272 X-Runtime: ['0.210192']
273 X-XSS-Protection: [1; mode=block]
274 content-length: ['1180']
275 status: {code: 200, message: OK}
276- request:
277 body: null
278 headers:
279 Accept: ['*/*']
280 Accept-Encoding: ['gzip, deflate']
281 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
282 Connection: [keep-alive]
283 User-Agent: [python-requests/2.18.4]
284 method: GET
285 uri: http://localhost:3000/api/v1/timelines/home
286 response:
287 body: {string: '[{"id":"100465649550538157","created_at":"2018-07-30T20:55:54.539Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":null,"uri":"http://localhost:3000/users/admin/statuses/100465649550538157","content":"\u003cp\u003eI
288 love japanimation!\u003c/p\u003e","url":"http://localhost:3000/@admin/100465649550538157","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"reblog":null,"application":{"name":"Mastodon.py
289 test suite","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"created_at":"2018-07-13T19:35:33.303Z","note":"\u003cp\u003e\u003c/p\u003e","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":1,"following_count":0,"statuses_count":80,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"100465649535137735","created_at":"2018-07-30T20:55:54.300Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"no","uri":"http://localhost:3000/users/admin/statuses/100465649535137735","content":"\u003cp\u003eGirugameshnetworking!\u003c/p\u003e","url":"http://localhost:3000/@admin/100465649535137735","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"reblog":null,"application":{"name":"Mastodon.py
290 test suite","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"created_at":"2018-07-13T19:35:33.303Z","note":"\u003cp\u003e\u003c/p\u003e","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":1,"following_count":0,"statuses_count":80,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"100465559679402754","created_at":"2018-07-30T20:33:03.214Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":null,"uri":"http://localhost:3000/users/admin/statuses/100465559679402754","content":"\u003cp\u003eI
291 love japanimation!\u003c/p\u003e","url":"http://localhost:3000/@admin/100465559679402754","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"reblog":null,"application":{"name":"Mastodon.py
292 test suite","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"created_at":"2018-07-13T19:35:33.303Z","note":"\u003cp\u003e\u003c/p\u003e","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":1,"following_count":0,"statuses_count":80,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"100465559659485435","created_at":"2018-07-30T20:33:02.930Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"no","uri":"http://localhost:3000/users/admin/statuses/100465559659485435","content":"\u003cp\u003eGirugameshnetworking!\u003c/p\u003e","url":"http://localhost:3000/@admin/100465559659485435","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"reblog":null,"application":{"name":"Mastodon.py
293 test suite","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"created_at":"2018-07-13T19:35:33.303Z","note":"\u003cp\u003e\u003c/p\u003e","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":1,"following_count":0,"statuses_count":80,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"100465559616321413","created_at":"2018-07-30T20:33:02.275Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":null,"uri":"http://localhost:3000/users/admin/statuses/100465559616321413","content":"\u003cp\u003eI
294 love animes\u003c/p\u003e","url":"http://localhost:3000/@admin/100465559616321413","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"reblog":null,"application":{"name":"Mastodon.py
295 test suite","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"created_at":"2018-07-13T19:35:33.303Z","note":"\u003cp\u003e\u003c/p\u003e","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":1,"following_count":0,"statuses_count":80,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"100369878639416248","created_at":"2018-07-13T23:00:06.400Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"fy","uri":"http://localhost:3000/users/mastodonpy_test/statuses/100369878639416248","content":"\u003cp\u003eit\u0026apos;s
296 cool guy\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test/100369878639416248","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Mastodon.py
297 test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"John
298 Lennon","locked":true,"bot":false,"created_at":"2018-07-13T23:02:25.260Z","note":"\u003cp\u003eI
299 walk funny\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/system/accounts/avatars/123/456/789/012/345/original/mastodonpyupload_.jpeg","avatar_static":"http://localhost:3000/system/accounts/avatars/123/456/789/012/345/original/mastodonpyupload_.jpeg","header":"http://localhost:3000/system/accounts/headers/123/456/789/012/345/original/mastodonpyupload_.jpeg","header_static":"http://localhost:3000/system/accounts/headers/123/456/789/012/345/original/mastodonpyupload_.jpeg","followers_count":0,"following_count":1,"statuses_count":90,"emojis":[],"fields":[{"name":"bread","value":"toasty."},{"name":"lasagna","value":"no!!!"}]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"100369876256619444","created_at":"2018-07-13T22:59:30.057Z","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/100369876256619444","content":"\u003cp\u003eon
300 the internet, nobody knows you\u0026apos;re a plane\u003c/p\u003e","url":"http://localhost:3000/@admin/100369876256619444","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"reblog":null,"application":{"name":"Mastodon.py
301 test suite","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"created_at":"2018-07-13T19:35:33.303Z","note":"\u003cp\u003e\u003c/p\u003e","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":1,"following_count":0,"statuses_count":80,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"100369876236168049","created_at":"2018-07-13T22:59:29.744Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":null,"uri":"http://localhost:3000/users/admin/statuses/100369876236168049","content":"\u003cp\u003e\u003cspan
302 class=\"h-card\"\u003e\u003ca href=\"http://localhost:3000/@mastodonpy_test\"
303 class=\"u-url mention\"\u003e@\u003cspan\u003emastodonpy_test\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e
304 beep beep I\u0026apos;m a jeep\u003c/p\u003e","url":"http://localhost:3000/@admin/100369876236168049","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"reblog":null,"application":{"name":"Mastodon.py
305 test suite","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"created_at":"2018-07-13T19:35:33.303Z","note":"\u003cp\u003e\u003c/p\u003e","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":1,"following_count":0,"statuses_count":80,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[{"id":"1234567890123456","username":"mastodonpy_test","url":"http://localhost:3000/@mastodonpy_test","acct":"mastodonpy_test"}],"tags":[],"emojis":[]},{"id":"100369866131840990","created_at":"2018-07-13T22:56:55.551Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"fy","uri":"http://localhost:3000/users/mastodonpy_test/statuses/100369866131840990","content":"\u003cp\u003eit\u0026apos;s
306 cool guy\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test/100369866131840990","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Mastodon.py
307 test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"John
308 Lennon","locked":true,"bot":false,"created_at":"2018-07-13T23:02:25.260Z","note":"\u003cp\u003eI
309 walk funny\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/system/accounts/avatars/123/456/789/012/345/original/mastodonpyupload_.jpeg","avatar_static":"http://localhost:3000/system/accounts/avatars/123/456/789/012/345/original/mastodonpyupload_.jpeg","header":"http://localhost:3000/system/accounts/headers/123/456/789/012/345/original/mastodonpyupload_.jpeg","header_static":"http://localhost:3000/system/accounts/headers/123/456/789/012/345/original/mastodonpyupload_.jpeg","followers_count":0,"following_count":1,"statuses_count":90,"emojis":[],"fields":[{"name":"bread","value":"toasty."},{"name":"lasagna","value":"no!!!"}]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"100369864730374084","created_at":"2018-07-13T22:56:34.197Z","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/100369864730374084","content":"\u003cp\u003eon
310 the internet, nobody knows you\u0026apos;re a plane\u003c/p\u003e","url":"http://localhost:3000/@admin/100369864730374084","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"reblog":null,"application":{"name":"Mastodon.py
311 test suite","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"created_at":"2018-07-13T19:35:33.303Z","note":"\u003cp\u003e\u003c/p\u003e","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":1,"following_count":0,"statuses_count":80,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"100369864711152431","created_at":"2018-07-13T22:56:33.885Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":null,"uri":"http://localhost:3000/users/admin/statuses/100369864711152431","content":"\u003cp\u003e\u003cspan
312 class=\"h-card\"\u003e\u003ca href=\"http://localhost:3000/@mastodonpy_test\"
313 class=\"u-url mention\"\u003e@\u003cspan\u003emastodonpy_test\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e
314 beep beep I\u0026apos;m a jeep\u003c/p\u003e","url":"http://localhost:3000/@admin/100369864711152431","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"reblog":null,"application":{"name":"Mastodon.py
315 test suite","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"created_at":"2018-07-13T19:35:33.303Z","note":"\u003cp\u003e\u003c/p\u003e","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":1,"following_count":0,"statuses_count":80,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[{"id":"1234567890123456","username":"mastodonpy_test","url":"http://localhost:3000/@mastodonpy_test","acct":"mastodonpy_test"}],"tags":[],"emojis":[]},{"id":"100369861426964675","created_at":"2018-07-13T22:55:43.756Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"fy","uri":"http://localhost:3000/users/mastodonpy_test/statuses/100369861426964675","content":"\u003cp\u003eit\u0026apos;s
316 cool guy\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test/100369861426964675","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Mastodon.py
317 test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"John
318 Lennon","locked":true,"bot":false,"created_at":"2018-07-13T23:02:25.260Z","note":"\u003cp\u003eI
319 walk funny\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/system/accounts/avatars/123/456/789/012/345/original/mastodonpyupload_.jpeg","avatar_static":"http://localhost:3000/system/accounts/avatars/123/456/789/012/345/original/mastodonpyupload_.jpeg","header":"http://localhost:3000/system/accounts/headers/123/456/789/012/345/original/mastodonpyupload_.jpeg","header_static":"http://localhost:3000/system/accounts/headers/123/456/789/012/345/original/mastodonpyupload_.jpeg","followers_count":0,"following_count":1,"statuses_count":90,"emojis":[],"fields":[{"name":"bread","value":"toasty."},{"name":"lasagna","value":"no!!!"}]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"100369860025045082","created_at":"2018-07-13T22:55:22.399Z","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/100369860025045082","content":"\u003cp\u003eon
320 the internet, nobody knows you\u0026apos;re a plane\u003c/p\u003e","url":"http://localhost:3000/@admin/100369860025045082","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"reblog":null,"application":{"name":"Mastodon.py
321 test suite","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"created_at":"2018-07-13T19:35:33.303Z","note":"\u003cp\u003e\u003c/p\u003e","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":1,"following_count":0,"statuses_count":80,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"100369860006737049","created_at":"2018-07-13T22:55:22.102Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":null,"uri":"http://localhost:3000/users/admin/statuses/100369860006737049","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\u0026apos;m a jeep\u003c/p\u003e","url":"http://localhost:3000/@admin/100369860006737049","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"reblog":null,"application":{"name":"Mastodon.py
325 test suite","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"created_at":"2018-07-13T19:35:33.303Z","note":"\u003cp\u003e\u003c/p\u003e","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":1,"following_count":0,"statuses_count":80,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[{"id":"1234567890123456","username":"mastodonpy_test","url":"http://localhost:3000/@mastodonpy_test","acct":"mastodonpy_test"}],"tags":[],"emojis":[]},{"id":"100369855289558259","created_at":"2018-07-13T22:54:10.107Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"fy","uri":"http://localhost:3000/users/mastodonpy_test/statuses/100369855289558259","content":"\u003cp\u003eit\u0026apos;s
326 cool guy\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test/100369855289558259","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Mastodon.py
327 test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"John
328 Lennon","locked":true,"bot":false,"created_at":"2018-07-13T23:02:25.260Z","note":"\u003cp\u003eI
329 walk funny\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/system/accounts/avatars/123/456/789/012/345/original/mastodonpyupload_.jpeg","avatar_static":"http://localhost:3000/system/accounts/avatars/123/456/789/012/345/original/mastodonpyupload_.jpeg","header":"http://localhost:3000/system/accounts/headers/123/456/789/012/345/original/mastodonpyupload_.jpeg","header_static":"http://localhost:3000/system/accounts/headers/123/456/789/012/345/original/mastodonpyupload_.jpeg","followers_count":0,"following_count":1,"statuses_count":90,"emojis":[],"fields":[{"name":"bread","value":"toasty."},{"name":"lasagna","value":"no!!!"}]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"100369853882920137","created_at":"2018-07-13T22:53:48.742Z","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/100369853882920137","content":"\u003cp\u003eon
330 the internet, nobody knows you\u0026apos;re a plane\u003c/p\u003e","url":"http://localhost:3000/@admin/100369853882920137","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"reblog":null,"application":{"name":"Mastodon.py
331 test suite","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"created_at":"2018-07-13T19:35:33.303Z","note":"\u003cp\u003e\u003c/p\u003e","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":1,"following_count":0,"statuses_count":80,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"100369853862414186","created_at":"2018-07-13T22:53:48.345Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":null,"uri":"http://localhost:3000/users/admin/statuses/100369853862414186","content":"\u003cp\u003e\u003cspan
332 class=\"h-card\"\u003e\u003ca href=\"http://localhost:3000/@mastodonpy_test\"
333 class=\"u-url mention\"\u003e@\u003cspan\u003emastodonpy_test\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e
334 beep beep I\u0026apos;m a jeep\u003c/p\u003e","url":"http://localhost:3000/@admin/100369853862414186","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"reblog":null,"application":{"name":"Mastodon.py
335 test suite","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"created_at":"2018-07-13T19:35:33.303Z","note":"\u003cp\u003e\u003c/p\u003e","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":1,"following_count":0,"statuses_count":80,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[{"id":"1234567890123456","username":"mastodonpy_test","url":"http://localhost:3000/@mastodonpy_test","acct":"mastodonpy_test"}],"tags":[],"emojis":[]},{"id":"100369852128654372","created_at":"2018-07-13T22:53:21.874Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"fy","uri":"http://localhost:3000/users/mastodonpy_test/statuses/100369852128654372","content":"\u003cp\u003eit\u0026apos;s
336 cool guy\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test/100369852128654372","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Mastodon.py
337 test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"John
338 Lennon","locked":true,"bot":false,"created_at":"2018-07-13T23:02:25.260Z","note":"\u003cp\u003eI
339 walk funny\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/system/accounts/avatars/123/456/789/012/345/original/mastodonpyupload_.jpeg","avatar_static":"http://localhost:3000/system/accounts/avatars/123/456/789/012/345/original/mastodonpyupload_.jpeg","header":"http://localhost:3000/system/accounts/headers/123/456/789/012/345/original/mastodonpyupload_.jpeg","header_static":"http://localhost:3000/system/accounts/headers/123/456/789/012/345/original/mastodonpyupload_.jpeg","followers_count":0,"following_count":1,"statuses_count":90,"emojis":[],"fields":[{"name":"bread","value":"toasty."},{"name":"lasagna","value":"no!!!"}]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"100369851557028692","created_at":"2018-07-13T22:53:13.238Z","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/100369851557028692","content":"\u003cp\u003eon
340 the internet, nobody knows you\u0026apos;re a plane\u003c/p\u003e","url":"http://localhost:3000/@admin/100369851557028692","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"reblog":null,"application":{"name":"Mastodon.py
341 test suite","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"created_at":"2018-07-13T19:35:33.303Z","note":"\u003cp\u003e\u003c/p\u003e","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":1,"following_count":0,"statuses_count":80,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"100369851538652347","created_at":"2018-07-13T22:53:12.887Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":null,"uri":"http://localhost:3000/users/admin/statuses/100369851538652347","content":"\u003cp\u003e\u003cspan
342 class=\"h-card\"\u003e\u003ca href=\"http://localhost:3000/@mastodonpy_test\"
343 class=\"u-url mention\"\u003e@\u003cspan\u003emastodonpy_test\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e
344 beep beep I\u0026apos;m a jeep\u003c/p\u003e","url":"http://localhost:3000/@admin/100369851538652347","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"reblog":null,"application":{"name":"Mastodon.py
345 test suite","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"created_at":"2018-07-13T19:35:33.303Z","note":"\u003cp\u003e\u003c/p\u003e","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":1,"following_count":0,"statuses_count":80,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[{"id":"1234567890123456","username":"mastodonpy_test","url":"http://localhost:3000/@mastodonpy_test","acct":"mastodonpy_test"}],"tags":[],"emojis":[]}]'}
346 headers:
347 Cache-Control: ['max-age=0, private, must-revalidate']
348 Content-Type: [application/json; charset=utf-8]
349 ETag: [W/"408775e600acd4bf60e4cfc6be27e500"]
350 Link: ['<http://localhost:3000/api/v1/timelines/home?max_id=100369851538652347>;
351 rel="next", <http://localhost:3000/api/v1/timelines/home?since_id=100465649550538157>;
352 rel="prev"']
353 Referrer-Policy: [strict-origin-when-cross-origin]
354 Transfer-Encoding: [chunked]
355 Vary: ['Accept-Encoding, Origin']
356 X-Content-Type-Options: [nosniff]
357 X-Download-Options: [noopen]
358 X-Frame-Options: [SAMEORIGIN]
359 X-Permitted-Cross-Domain-Policies: [none]
360 X-Request-Id: [22585410-c3a3-4511-8910-fc239c9e013c]
361 X-Runtime: ['0.234728']
362 X-XSS-Protection: [1; mode=block]
363 content-length: ['26971']
364 status: {code: 200, message: OK}
365- request:
366 body: null
367 headers:
368 Accept: ['*/*']
369 Accept-Encoding: ['gzip, deflate']
370 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
371 Connection: [keep-alive]
372 User-Agent: [python-requests/2.18.4]
373 method: GET
374 uri: http://localhost:3000/api/v1/filters
375 response:
376 body: {string: '[{"id":1,"phrase":"anime","context":["notifications"],"whole_word":true,"expires_at":null,"irreversible":true},{"id":21,"phrase":"anime","context":["home"],"whole_word":false,"expires_at":null,"irreversible":true},{"id":22,"phrase":"girugamesh","context":["home"],"whole_word":true,"expires_at":null,"irreversible":true},{"id":23,"phrase":"japanimation","context":["notifications"],"whole_word":true,"expires_at":null,"irreversible":true}]'}
377 headers:
378 Cache-Control: ['max-age=0, private, must-revalidate']
379 Content-Type: [application/json; charset=utf-8]
380 ETag: [W/"c379479dc1444051808da0cc7033071f"]
381 Referrer-Policy: [strict-origin-when-cross-origin]
382 Transfer-Encoding: [chunked]
383 Vary: ['Accept-Encoding, Origin']
384 X-Content-Type-Options: [nosniff]
385 X-Download-Options: [noopen]
386 X-Frame-Options: [SAMEORIGIN]
387 X-Permitted-Cross-Domain-Policies: [none]
388 X-Request-Id: [d2cca086-1fbf-4abd-915c-3523bd9dfd7f]
389 X-Runtime: ['0.023878']
390 X-XSS-Protection: [1; mode=block]
391 content-length: ['439']
392 status: {code: 200, message: OK}
393- request:
394 body: null
395 headers:
396 Accept: ['*/*']
397 Accept-Encoding: ['gzip, deflate']
398 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
399 Connection: [keep-alive]
400 Content-Length: ['0']
401 User-Agent: [python-requests/2.18.4]
402 method: DELETE
403 uri: http://localhost:3000/api/v1/filters/21
404 response:
405 body: {string: '{}'}
406 headers:
407 Cache-Control: ['max-age=0, private, must-revalidate']
408 Content-Type: [application/json; charset=utf-8]
409 ETag: [W/"d850b27b9f6f9656368e1d9e497f8d16"]
410 Referrer-Policy: [strict-origin-when-cross-origin]
411 Transfer-Encoding: [chunked]
412 Vary: ['Accept-Encoding, Origin']
413 X-Content-Type-Options: [nosniff]
414 X-Download-Options: [noopen]
415 X-Frame-Options: [SAMEORIGIN]
416 X-Permitted-Cross-Domain-Policies: [none]
417 X-Request-Id: [350dda8a-1634-44c1-94b8-60ae320d7021]
418 X-Runtime: ['0.039442']
419 X-XSS-Protection: [1; mode=block]
420 content-length: ['2']
421 status: {code: 200, message: OK}
422- request:
423 body: null
424 headers:
425 Accept: ['*/*']
426 Accept-Encoding: ['gzip, deflate']
427 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
428 Connection: [keep-alive]
429 Content-Length: ['0']
430 User-Agent: [python-requests/2.18.4]
431 method: DELETE
432 uri: http://localhost:3000/api/v1/filters/22
433 response:
434 body: {string: '{}'}
435 headers:
436 Cache-Control: ['max-age=0, private, must-revalidate']
437 Content-Type: [application/json; charset=utf-8]
438 ETag: [W/"d850b27b9f6f9656368e1d9e497f8d16"]
439 Referrer-Policy: [strict-origin-when-cross-origin]
440 Transfer-Encoding: [chunked]
441 Vary: ['Accept-Encoding, Origin']
442 X-Content-Type-Options: [nosniff]
443 X-Download-Options: [noopen]
444 X-Frame-Options: [SAMEORIGIN]
445 X-Permitted-Cross-Domain-Policies: [none]
446 X-Request-Id: [6474b845-d873-4aa9-a77a-876af3abfad4]
447 X-Runtime: ['0.037098']
448 X-XSS-Protection: [1; mode=block]
449 content-length: ['2']
450 status: {code: 200, message: OK}
451- request:
452 body: null
453 headers:
454 Accept: ['*/*']
455 Accept-Encoding: ['gzip, deflate']
456 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
457 Connection: [keep-alive]
458 Content-Length: ['0']
459 User-Agent: [python-requests/2.18.4]
460 method: DELETE
461 uri: http://localhost:3000/api/v1/filters/23
462 response:
463 body: {string: '{}'}
464 headers:
465 Cache-Control: ['max-age=0, private, must-revalidate']
466 Content-Type: [application/json; charset=utf-8]
467 ETag: [W/"d850b27b9f6f9656368e1d9e497f8d16"]
468 Referrer-Policy: [strict-origin-when-cross-origin]
469 Transfer-Encoding: [chunked]
470 Vary: ['Accept-Encoding, Origin']
471 X-Content-Type-Options: [nosniff]
472 X-Download-Options: [noopen]
473 X-Frame-Options: [SAMEORIGIN]
474 X-Permitted-Cross-Domain-Policies: [none]
475 X-Request-Id: [7ff606c4-f26f-47f6-a37d-4928811c56ab]
476 X-Runtime: ['0.025941']
477 X-XSS-Protection: [1; mode=block]
478 content-length: ['2']
479 status: {code: 200, message: OK}
480- request:
481 body: null
482 headers:
483 Accept: ['*/*']
484 Accept-Encoding: ['gzip, deflate']
485 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN_2]
486 Connection: [keep-alive]
487 Content-Length: ['0']
488 User-Agent: [python-requests/2.18.4]
489 method: DELETE
490 uri: http://localhost:3000/api/v1/statuses/100465649501974043
491 response:
492 body: {string: '{}'}
493 headers:
494 Cache-Control: ['max-age=0, private, must-revalidate']
495 Content-Type: [application/json; charset=utf-8]
496 ETag: [W/"d850b27b9f6f9656368e1d9e497f8d16"]
497 Referrer-Policy: [strict-origin-when-cross-origin]
498 Transfer-Encoding: [chunked]
499 Vary: ['Accept-Encoding, Origin']
500 X-Content-Type-Options: [nosniff]
501 X-Download-Options: [noopen]
502 X-Frame-Options: [SAMEORIGIN]
503 X-Permitted-Cross-Domain-Policies: [none]
504 X-Request-Id: [1835d097-f867-45ed-8ce5-c345746477db]
505 X-Runtime: ['0.029602']
506 X-XSS-Protection: [1; mode=block]
507 content-length: ['2']
508 status: {code: 200, message: OK}
509- request:
510 body: null
511 headers:
512 Accept: ['*/*']
513 Accept-Encoding: ['gzip, deflate']
514 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN_2]
515 Connection: [keep-alive]
516 Content-Length: ['0']
517 User-Agent: [python-requests/2.18.4]
518 method: DELETE
519 uri: http://localhost:3000/api/v1/statuses/100465649520177606
520 response:
521 body: {string: '{}'}
522 headers:
523 Cache-Control: ['max-age=0, private, must-revalidate']
524 Content-Type: [application/json; charset=utf-8]
525 ETag: [W/"d850b27b9f6f9656368e1d9e497f8d16"]
526 Referrer-Policy: [strict-origin-when-cross-origin]
527 Transfer-Encoding: [chunked]
528 Vary: ['Accept-Encoding, Origin']
529 X-Content-Type-Options: [nosniff]
530 X-Download-Options: [noopen]
531 X-Frame-Options: [SAMEORIGIN]
532 X-Permitted-Cross-Domain-Policies: [none]
533 X-Request-Id: [4752901d-e7a5-48db-99a1-51ad94259990]
534 X-Runtime: ['0.064092']
535 X-XSS-Protection: [1; mode=block]
536 content-length: ['2']
537 status: {code: 200, message: OK}
538- request:
539 body: null
540 headers:
541 Accept: ['*/*']
542 Accept-Encoding: ['gzip, deflate']
543 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN_2]
544 Connection: [keep-alive]
545 Content-Length: ['0']
546 User-Agent: [python-requests/2.18.4]
547 method: DELETE
548 uri: http://localhost:3000/api/v1/statuses/100465649535137735
549 response:
550 body: {string: '{}'}
551 headers:
552 Cache-Control: ['max-age=0, private, must-revalidate']
553 Content-Type: [application/json; charset=utf-8]
554 ETag: [W/"d850b27b9f6f9656368e1d9e497f8d16"]
555 Referrer-Policy: [strict-origin-when-cross-origin]
556 Transfer-Encoding: [chunked]
557 Vary: ['Accept-Encoding, Origin']
558 X-Content-Type-Options: [nosniff]
559 X-Download-Options: [noopen]
560 X-Frame-Options: [SAMEORIGIN]
561 X-Permitted-Cross-Domain-Policies: [none]
562 X-Request-Id: [dec3c012-4e10-4de3-b6ca-7f857866f7af]
563 X-Runtime: ['0.086143']
564 X-XSS-Protection: [1; mode=block]
565 content-length: ['2']
566 status: {code: 200, message: OK}
567- request:
568 body: null
569 headers:
570 Accept: ['*/*']
571 Accept-Encoding: ['gzip, deflate']
572 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN_2]
573 Connection: [keep-alive]
574 Content-Length: ['0']
575 User-Agent: [python-requests/2.18.4]
576 method: DELETE
577 uri: http://localhost:3000/api/v1/statuses/100465649550538157
578 response:
579 body: {string: '{}'}
580 headers:
581 Cache-Control: ['max-age=0, private, must-revalidate']
582 Content-Type: [application/json; charset=utf-8]
583 ETag: [W/"d850b27b9f6f9656368e1d9e497f8d16"]
584 Referrer-Policy: [strict-origin-when-cross-origin]
585 Transfer-Encoding: [chunked]
586 Vary: ['Accept-Encoding, Origin']
587 X-Content-Type-Options: [nosniff]
588 X-Download-Options: [noopen]
589 X-Frame-Options: [SAMEORIGIN]
590 X-Permitted-Cross-Domain-Policies: [none]
591 X-Request-Id: [77ce0f01-b387-4453-b996-cade29ca890e]
592 X-Runtime: ['0.093671']
593 X-XSS-Protection: [1; mode=block]
594 content-length: ['2']
595 status: {code: 200, message: OK}
596version: 1
diff --git a/tests/test_filters.py b/tests/test_filters.py
new file mode 100644
index 0000000..dc39ddb
--- /dev/null
+++ b/tests/test_filters.py
@@ -0,0 +1,91 @@
1import pytest
2import time
3
4@pytest.mark.vcr()
5def test_filter_create(api):
6 keyword_filter = api.filter_create("anime", ['notifications'], irreversible = False, whole_word = True, expires_in = None)
7 try:
8 assert(keyword_filter)
9
10 all_filters = api.filters()
11 assert(keyword_filter in all_filters)
12 assert(keyword_filter.irreversible == False)
13 assert(keyword_filter.whole_word == True)
14
15 keyword_filter_2 = api.filter(keyword_filter.id)
16 assert(keyword_filter == keyword_filter_2)
17 finally:
18 api.filter_delete(keyword_filter)
19
20
21 keyword_filter = api.filter_create("anime", ['notifications'], irreversible = False, whole_word = False, expires_in = None)
22 try:
23 assert(keyword_filter)
24 assert(keyword_filter.irreversible == False)
25 assert(keyword_filter.whole_word == False)
26
27 all_filters = api.filters()
28 assert(keyword_filter in all_filters)
29
30 keyword_filter_2 = api.filter(keyword_filter.id)
31 assert(keyword_filter == keyword_filter_2)
32 finally:
33 api.filter_delete(keyword_filter)
34
35@pytest.mark.vcr()
36def test_filter_serverside(api, api2):
37 api.account_follow(api2.account_verify_credentials())
38 keyword_filter_1 = api.filter_create("anime", ['home'], irreversible = True, whole_word = False, expires_in = None)
39 keyword_filter_2 = api.filter_create("girugamesh", ['home'], irreversible = True, whole_word = True, expires_in = None)
40 keyword_filter_3 = api.filter_create("japanimation", ['notifications'], irreversible = True, whole_word = True, expires_in = None)
41 time.sleep(2)
42 status_1 = api2.toot("I love animes")
43 status_2 = api2.toot("Girugamesh!")
44 status_3 = api2.toot("Girugameshnetworking!")
45 status_4 = api2.toot("I love japanimation!")
46 time.sleep(2)
47 tl = api.timeline_home()
48 try:
49 assert not status_1['id'] in map(lambda st: st['id'], tl)
50 assert not status_2['id'] in map(lambda st: st['id'], tl)
51 assert status_3['id'] in map(lambda st: st['id'], tl)
52 assert status_4['id'] in map(lambda st: st['id'], tl)
53 finally:
54 api.filter_delete(keyword_filter_1)
55 api.filter_delete(keyword_filter_2)
56 api.filter_delete(keyword_filter_3)
57 api2.status_delete(status_1)
58 api2.status_delete(status_2)
59 api2.status_delete(status_3)
60 api2.status_delete(status_4)
61
62@pytest.mark.vcr()
63def test_filter_clientside(api, api2):
64 api.account_follow(api2.account_verify_credentials())
65 keyword_filter_1 = api.filter_create("anime", ['home'], irreversible = False, whole_word = False, expires_in = None)
66 keyword_filter_2 = api.filter_create("girugamesh", ['home'], irreversible = False, whole_word = True, expires_in = None)
67 keyword_filter_3 = api.filter_create("japanimation", ['notifications'], irreversible = False, whole_word = True, expires_in = None)
68 status_1 = api2.toot("I love animes")
69 status_2 = api2.toot("Girugamesh!")
70 status_3 = api2.toot("Girugameshnetworking!")
71 status_4 = api2.toot("I love japanimation!")
72 tl = api.timeline_home()
73 try:
74 assert status_1['id'] in map(lambda st: st['id'], tl)
75 assert status_2['id'] in map(lambda st: st['id'], tl)
76 assert status_3['id'] in map(lambda st: st['id'], tl)
77 assert status_4['id'] in map(lambda st: st['id'], tl)
78
79 filtered = api.filters_apply(tl, [keyword_filter_1, keyword_filter_2, keyword_filter_3], 'home')
80 assert not status_1['id'] in map(lambda st: st['id'], filtered)
81 assert not status_2['id'] in map(lambda st: st['id'], filtered)
82 assert status_3['id'] in map(lambda st: st['id'], filtered)
83 assert status_4['id'] in map(lambda st: st['id'], filtered)
84 finally:
85 api.filter_delete(keyword_filter_1)
86 api.filter_delete(keyword_filter_2)
87 api.filter_delete(keyword_filter_3)
88 api2.status_delete(status_1)
89 api2.status_delete(status_2)
90 api2.status_delete(status_3)
91 api2.status_delete(status_4)
Powered by cgit v1.2.3 (git 2.41.0)