aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/cassettes/test_admin_stats.yaml42
-rw-r--r--tests/test_admin.py16
2 files changed, 29 insertions, 29 deletions
diff --git a/tests/cassettes/test_admin_stats.yaml b/tests/cassettes/test_admin_stats.yaml
index dc88b9b..6a72c83 100644
--- a/tests/cassettes/test_admin_stats.yaml
+++ b/tests/cassettes/test_admin_stats.yaml
@@ -6,7 +6,7 @@ interactions:
6 {"domain": "chitter.xyz"}, "keys": ["active_users", "new_users", "opened_reports", 6 {"domain": "chitter.xyz"}, "keys": ["active_users", "new_users", "opened_reports",
7 "resolved_reports", "instance_accounts", "instance_media_attachments", "instance_reports", 7 "resolved_reports", "instance_accounts", "instance_media_attachments", "instance_reports",
8 "instance_statuses", "instance_follows", "instance_followers"], "start_at": 8 "instance_statuses", "instance_follows", "instance_followers"], "start_at":
9 "2022-11-22T00:42:51+00:00", "end_at": "2022-11-27T00:42:51+00:00"}' 9 "2020-10-04T21:00:00+00:00", "end_at": "2020-10-09T21:00:00+00:00"}'
10 headers: 10 headers:
11 Accept: 11 Accept:
12 - '*/*' 12 - '*/*'
@@ -26,15 +26,15 @@ interactions:
26 uri: http://localhost:3000/api/v1/admin/measures 26 uri: http://localhost:3000/api/v1/admin/measures
27 response: 27 response:
28 body: 28 body:
29 string: '[{"key":"active_users","unit":null,"total":"2","previous_total":"0","data":[{"date":"2022-11-22T00:00:00Z","value":"0"},{"date":"2022-11-23T00:00:00Z","value":"0"},{"date":"2022-11-24T00:00:00Z","value":"0"},{"date":"2022-11-25T00:00:00Z","value":"0"},{"date":"2022-11-26T00:00:00Z","value":"2"}]},{"key":"new_users","unit":null,"total":"4","previous_total":"0","data":[{"date":"2022-11-22T00:00:00.000+00:00","value":"0"},{"date":"2022-11-23T00:00:00.000+00:00","value":"0"},{"date":"2022-11-24T00:00:00.000+00:00","value":"0"},{"date":"2022-11-25T00:00:00.000+00:00","value":"0"},{"date":"2022-11-26T00:00:00.000+00:00","value":"4"},{"date":"2022-11-27T00:00:00.000+00:00","value":"0"}]},{"key":"opened_reports","unit":null,"total":"0","previous_total":"0","data":[{"date":"2022-11-22T00:00:00.000+00:00","value":"0"},{"date":"2022-11-23T00:00:00.000+00:00","value":"0"},{"date":"2022-11-24T00:00:00.000+00:00","value":"0"},{"date":"2022-11-25T00:00:00.000+00:00","value":"0"},{"date":"2022-11-26T00:00:00.000+00:00","value":"0"},{"date":"2022-11-27T00:00:00.000+00:00","value":"0"}]},{"key":"resolved_reports","unit":null,"total":"0","previous_total":"0","data":[{"date":"2022-11-22T00:00:00.000+00:00","value":"0"},{"date":"2022-11-23T00:00:00.000+00:00","value":"0"},{"date":"2022-11-24T00:00:00.000+00:00","value":"0"},{"date":"2022-11-25T00:00:00.000+00:00","value":"0"},{"date":"2022-11-26T00:00:00.000+00:00","value":"0"},{"date":"2022-11-27T00:00:00.000+00:00","value":"0"}]},{"key":"instance_accounts","unit":null,"total":"0","data":[{"date":"2022-11-22T00:00:00.000+00:00","value":"0"},{"date":"2022-11-23T00:00:00.000+00:00","value":"0"},{"date":"2022-11-24T00:00:00.000+00:00","value":"0"},{"date":"2022-11-25T00:00:00.000+00:00","value":"0"},{"date":"2022-11-26T00:00:00.000+00:00","value":"0"},{"date":"2022-11-27T00:00:00.000+00:00","value":"0"}]},{"key":"instance_media_attachments","unit":"bytes","total":"0","human_value":"0 29 string: '[{"key":"active_users","unit":null,"total":"0","previous_total":"0","data":[{"date":"2020-10-04T00:00:00Z","value":"0"},{"date":"2020-10-05T00:00:00Z","value":"0"},{"date":"2020-10-06T00:00:00Z","value":"0"},{"date":"2020-10-07T00:00:00Z","value":"0"},{"date":"2020-10-08T00:00:00Z","value":"0"}]},{"key":"new_users","unit":null,"total":"0","previous_total":"0","data":[{"date":"2020-10-04T00:00:00.000+00:00","value":"0"},{"date":"2020-10-05T00:00:00.000+00:00","value":"0"},{"date":"2020-10-06T00:00:00.000+00:00","value":"0"},{"date":"2020-10-07T00:00:00.000+00:00","value":"0"},{"date":"2020-10-08T00:00:00.000+00:00","value":"0"},{"date":"2020-10-09T00:00:00.000+00:00","value":"0"}]},{"key":"opened_reports","unit":null,"total":"0","previous_total":"0","data":[{"date":"2020-10-04T00:00:00.000+00:00","value":"0"},{"date":"2020-10-05T00:00:00.000+00:00","value":"0"},{"date":"2020-10-06T00:00:00.000+00:00","value":"0"},{"date":"2020-10-07T00:00:00.000+00:00","value":"0"},{"date":"2020-10-08T00:00:00.000+00:00","value":"0"},{"date":"2020-10-09T00:00:00.000+00:00","value":"0"}]},{"key":"resolved_reports","unit":null,"total":"0","previous_total":"0","data":[{"date":"2020-10-04T00:00:00.000+00:00","value":"0"},{"date":"2020-10-05T00:00:00.000+00:00","value":"0"},{"date":"2020-10-06T00:00:00.000+00:00","value":"0"},{"date":"2020-10-07T00:00:00.000+00:00","value":"0"},{"date":"2020-10-08T00:00:00.000+00:00","value":"0"},{"date":"2020-10-09T00:00:00.000+00:00","value":"0"}]},{"key":"instance_accounts","unit":null,"total":"0","data":[{"date":"2020-10-04T00:00:00.000+00:00","value":"0"},{"date":"2020-10-05T00:00:00.000+00:00","value":"0"},{"date":"2020-10-06T00:00:00.000+00:00","value":"0"},{"date":"2020-10-07T00:00:00.000+00:00","value":"0"},{"date":"2020-10-08T00:00:00.000+00:00","value":"0"},{"date":"2020-10-09T00:00:00.000+00:00","value":"0"}]},{"key":"instance_media_attachments","unit":"bytes","total":"0","human_value":"0
30 Bytes","data":[{"date":"2022-11-22T00:00:00.000+00:00","value":""},{"date":"2022-11-23T00:00:00.000+00:00","value":""},{"date":"2022-11-24T00:00:00.000+00:00","value":""},{"date":"2022-11-25T00:00:00.000+00:00","value":""},{"date":"2022-11-26T00:00:00.000+00:00","value":""},{"date":"2022-11-27T00:00:00.000+00:00","value":""}]},{"key":"instance_reports","unit":null,"total":"0","data":[{"date":"2022-11-22T00:00:00.000+00:00","value":"0"},{"date":"2022-11-23T00:00:00.000+00:00","value":"0"},{"date":"2022-11-24T00:00:00.000+00:00","value":"0"},{"date":"2022-11-25T00:00:00.000+00:00","value":"0"},{"date":"2022-11-26T00:00:00.000+00:00","value":"0"},{"date":"2022-11-27T00:00:00.000+00:00","value":"0"}]},{"key":"instance_statuses","unit":null,"total":"0","data":[{"date":"2022-11-22T00:00:00.000+00:00","value":"0"},{"date":"2022-11-23T00:00:00.000+00:00","value":"0"},{"date":"2022-11-24T00:00:00.000+00:00","value":"0"},{"date":"2022-11-25T00:00:00.000+00:00","value":"0"},{"date":"2022-11-26T00:00:00.000+00:00","value":"0"},{"date":"2022-11-27T00:00:00.000+00:00","value":"0"}]},{"key":"instance_follows","unit":null,"total":"0","data":[{"date":"2022-11-22T00:00:00.000+00:00","value":"0"},{"date":"2022-11-23T00:00:00.000+00:00","value":"0"},{"date":"2022-11-24T00:00:00.000+00:00","value":"0"},{"date":"2022-11-25T00:00:00.000+00:00","value":"0"},{"date":"2022-11-26T00:00:00.000+00:00","value":"0"},{"date":"2022-11-27T00:00:00.000+00:00","value":"0"}]},{"key":"instance_followers","unit":null,"total":"0","data":[{"date":"2022-11-22T00:00:00.000+00:00","value":"0"},{"date":"2022-11-23T00:00:00.000+00:00","value":"0"},{"date":"2022-11-24T00:00:00.000+00:00","value":"0"},{"date":"2022-11-25T00:00:00.000+00:00","value":"0"},{"date":"2022-11-26T00:00:00.000+00:00","value":"0"},{"date":"2022-11-27T00:00:00.000+00:00","value":"0"}]}]' 30 Bytes","data":[{"date":"2020-10-04T00:00:00.000+00:00","value":""},{"date":"2020-10-05T00:00:00.000+00:00","value":""},{"date":"2020-10-06T00:00:00.000+00:00","value":""},{"date":"2020-10-07T00:00:00.000+00:00","value":""},{"date":"2020-10-08T00:00:00.000+00:00","value":""},{"date":"2020-10-09T00:00:00.000+00:00","value":""}]},{"key":"instance_reports","unit":null,"total":"0","data":[{"date":"2020-10-04T00:00:00.000+00:00","value":"0"},{"date":"2020-10-05T00:00:00.000+00:00","value":"0"},{"date":"2020-10-06T00:00:00.000+00:00","value":"0"},{"date":"2020-10-07T00:00:00.000+00:00","value":"0"},{"date":"2020-10-08T00:00:00.000+00:00","value":"0"},{"date":"2020-10-09T00:00:00.000+00:00","value":"0"}]},{"key":"instance_statuses","unit":null,"total":"0","data":[{"date":"2020-10-04T00:00:00.000+00:00","value":"0"},{"date":"2020-10-05T00:00:00.000+00:00","value":"0"},{"date":"2020-10-06T00:00:00.000+00:00","value":"0"},{"date":"2020-10-07T00:00:00.000+00:00","value":"0"},{"date":"2020-10-08T00:00:00.000+00:00","value":"0"},{"date":"2020-10-09T00:00:00.000+00:00","value":"0"}]},{"key":"instance_follows","unit":null,"total":"0","data":[{"date":"2020-10-04T00:00:00.000+00:00","value":"0"},{"date":"2020-10-05T00:00:00.000+00:00","value":"0"},{"date":"2020-10-06T00:00:00.000+00:00","value":"0"},{"date":"2020-10-07T00:00:00.000+00:00","value":"0"},{"date":"2020-10-08T00:00:00.000+00:00","value":"0"},{"date":"2020-10-09T00:00:00.000+00:00","value":"0"}]},{"key":"instance_followers","unit":null,"total":"0","data":[{"date":"2020-10-04T00:00:00.000+00:00","value":"0"},{"date":"2020-10-05T00:00:00.000+00:00","value":"0"},{"date":"2020-10-06T00:00:00.000+00:00","value":"0"},{"date":"2020-10-07T00:00:00.000+00:00","value":"0"},{"date":"2020-10-08T00:00:00.000+00:00","value":"0"},{"date":"2020-10-09T00:00:00.000+00:00","value":"0"}]}]'
31 headers: 31 headers:
32 Cache-Control: 32 Cache-Control:
33 - no-store 33 - no-store
34 Content-Security-Policy: 34 Content-Security-Policy:
35 - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src 35 - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src
36 ''self'' http://localhost:3000; img-src ''self'' https: data: blob: http://localhost:3000; 36 ''self'' http://localhost:3000; img-src ''self'' https: data: blob: http://localhost:3000;
37 style-src ''self'' http://localhost:3000 ''nonce-drS6KPeE5pwtqRFGPVh3ww==''; 37 style-src ''self'' http://localhost:3000 ''nonce-WiDzKVOhti4HVtIse/Oj6w=='';
38 media-src ''self'' https: data: http://localhost:3000; frame-src ''self'' 38 media-src ''self'' https: data: http://localhost:3000; frame-src ''self''
39 https:; manifest-src ''self'' http://localhost:3000; connect-src ''self'' 39 https:; manifest-src ''self'' http://localhost:3000; connect-src ''self''
40 data: blob: http://localhost:3000 http://localhost:3000 ws://localhost:4000 40 data: blob: http://localhost:3000 http://localhost:3000 ws://localhost:4000
@@ -44,7 +44,7 @@ interactions:
44 Content-Type: 44 Content-Type:
45 - application/json; charset=utf-8 45 - application/json; charset=utf-8
46 ETag: 46 ETag:
47 - W/"bb40e02b66cfdf5be1ff5a980c8242af" 47 - W/"7a14cdc98ebdc4f4ee6517f7b12be48b"
48 Referrer-Policy: 48 Referrer-Policy:
49 - strict-origin-when-cross-origin 49 - strict-origin-when-cross-origin
50 Transfer-Encoding: 50 Transfer-Encoding:
@@ -60,9 +60,9 @@ interactions:
60 X-Permitted-Cross-Domain-Policies: 60 X-Permitted-Cross-Domain-Policies:
61 - none 61 - none
62 X-Request-Id: 62 X-Request-Id:
63 - 11b2cb9c-d3c4-41ba-802d-888e1ee62c9e 63 - 07db387f-9f34-4f15-8635-21a9850d96b3
64 X-Runtime: 64 X-Runtime:
65 - '0.540102' 65 - '0.082628'
66 X-XSS-Protection: 66 X-XSS-Protection:
67 - 1; mode=block 67 - 1; mode=block
68 status: 68 status:
@@ -71,8 +71,8 @@ interactions:
71- request: 71- request:
72 body: '{"instance_accounts": {"domain": "chitter.xyz"}, "instance_languages": 72 body: '{"instance_accounts": {"domain": "chitter.xyz"}, "instance_languages":
73 {"domain": "chitter.xyz"}, "keys": ["languages", "sources", "servers", "space_usage", 73 {"domain": "chitter.xyz"}, "keys": ["languages", "sources", "servers", "space_usage",
74 "instance_accounts", "instance_languages"], "limit": 3, "start_at": "2022-11-22T00:42:52+00:00", 74 "instance_accounts", "instance_languages"], "limit": 3, "start_at": "2020-10-04T21:00:00+00:00",
75 "end_at": "2022-11-27T00:42:52+00:00"}' 75 "end_at": "2020-10-09T21:00:00+00:00"}'
76 headers: 76 headers:
77 Accept: 77 Accept:
78 - '*/*' 78 - '*/*'
@@ -92,8 +92,8 @@ interactions:
92 uri: http://localhost:3000/api/v1/admin/dimensions 92 uri: http://localhost:3000/api/v1/admin/dimensions
93 response: 93 response:
94 body: 94 body:
95 string: '[{"key":"languages","data":[{"key":"de","human_key":"German","value":"1"}]},{"key":"sources","data":[{"key":"web","human_key":"Website","value":"4"}]},{"key":"servers","data":[]},{"key":"space_usage","data":[{"key":"postgresql","human_key":"PostgreSQL","value":"16610095","unit":"bytes","human_value":"15.8 95 string: '[{"key":"languages","data":[]},{"key":"sources","data":[]},{"key":"servers","data":[]},{"key":"space_usage","data":[{"key":"postgresql","human_key":"PostgreSQL","value":"16610095","unit":"bytes","human_value":"15.8
96 MB"},{"key":"redis","human_key":"Redis","value":"1560216","unit":"bytes","human_value":"1.49 96 MB"},{"key":"redis","human_key":"Redis","value":"1569560","unit":"bytes","human_value":"1.5
97 MB"},{"key":"media","human_key":"Media storage","value":"0","unit":"bytes","human_value":"0 97 MB"},{"key":"media","human_key":"Media storage","value":"0","unit":"bytes","human_value":"0
98 Bytes"}]},{"key":"instance_accounts","data":[]},{"key":"instance_languages","data":[]}]' 98 Bytes"}]},{"key":"instance_accounts","data":[]},{"key":"instance_languages","data":[]}]'
99 headers: 99 headers:
@@ -102,7 +102,7 @@ interactions:
102 Content-Security-Policy: 102 Content-Security-Policy:
103 - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src 103 - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src
104 ''self'' http://localhost:3000; img-src ''self'' https: data: blob: http://localhost:3000; 104 ''self'' http://localhost:3000; img-src ''self'' https: data: blob: http://localhost:3000;
105 style-src ''self'' http://localhost:3000 ''nonce-tTPpzIcGAZb7y2EXyfEsFg==''; 105 style-src ''self'' http://localhost:3000 ''nonce-8BlKJ/uomeClHGm07flBKg=='';
106 media-src ''self'' https: data: http://localhost:3000; frame-src ''self'' 106 media-src ''self'' https: data: http://localhost:3000; frame-src ''self''
107 https:; manifest-src ''self'' http://localhost:3000; connect-src ''self'' 107 https:; manifest-src ''self'' http://localhost:3000; connect-src ''self''
108 data: blob: http://localhost:3000 http://localhost:3000 ws://localhost:4000 108 data: blob: http://localhost:3000 http://localhost:3000 ws://localhost:4000
@@ -112,7 +112,7 @@ interactions:
112 Content-Type: 112 Content-Type:
113 - application/json; charset=utf-8 113 - application/json; charset=utf-8
114 ETag: 114 ETag:
115 - W/"b5c3e0d37fd2fdab9859f566f5b2fa2e" 115 - W/"2d84840d6cd38577ff002ff961df6a42"
116 Referrer-Policy: 116 Referrer-Policy:
117 - strict-origin-when-cross-origin 117 - strict-origin-when-cross-origin
118 Transfer-Encoding: 118 Transfer-Encoding:
@@ -128,16 +128,16 @@ interactions:
128 X-Permitted-Cross-Domain-Policies: 128 X-Permitted-Cross-Domain-Policies:
129 - none 129 - none
130 X-Request-Id: 130 X-Request-Id:
131 - 7332d9ca-00cb-4eaf-9d95-ee3baf8414f9 131 - 3837d91b-a8b1-4fb9-a04b-2e85c1d70cd6
132 X-Runtime: 132 X-Runtime:
133 - '0.066790' 133 - '0.029226'
134 X-XSS-Protection: 134 X-XSS-Protection:
135 - 1; mode=block 135 - 1; mode=block
136 status: 136 status:
137 code: 200 137 code: 200
138 message: OK 138 message: OK
139- request: 139- request:
140 body: start_at=2022-11-17T00%3A42%3A52%2B00%3A00&end_at=2022-11-27T00%3A42%3A52%2B00%3A00&frequency=day 140 body: start_at=2020-09-29T21%3A00%3A00%2B00%3A00&end_at=2020-10-09T21%3A00%3A00%2B00%3A00&frequency=day
141 headers: 141 headers:
142 Accept: 142 Accept:
143 - '*/*' 143 - '*/*'
@@ -157,14 +157,14 @@ interactions:
157 uri: http://localhost:3000/api/v1/admin/retention 157 uri: http://localhost:3000/api/v1/admin/retention
158 response: 158 response:
159 body: 159 body:
160 string: '[{"period":"2022-11-17T00:00:00+00:00","frequency":"day","data":[{"date":"2022-11-17T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2022-11-18T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2022-11-19T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2022-11-20T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2022-11-21T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2022-11-22T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2022-11-23T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2022-11-24T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2022-11-25T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2022-11-26T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2022-11-27T00:00:00+00:00","rate":0.0,"value":"0"}]},{"period":"2022-11-18T00:00:00+00:00","frequency":"day","data":[{"date":"2022-11-18T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2022-11-19T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2022-11-20T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2022-11-21T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2022-11-22T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2022-11-23T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2022-11-24T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2022-11-25T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2022-11-26T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2022-11-27T00:00:00+00:00","rate":0.0,"value":"0"}]},{"period":"2022-11-19T00:00:00+00:00","frequency":"day","data":[{"date":"2022-11-19T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2022-11-20T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2022-11-21T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2022-11-22T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2022-11-23T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2022-11-24T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2022-11-25T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2022-11-26T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2022-11-27T00:00:00+00:00","rate":0.0,"value":"0"}]},{"period":"2022-11-20T00:00:00+00:00","frequency":"day","data":[{"date":"2022-11-20T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2022-11-21T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2022-11-22T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2022-11-23T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2022-11-24T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2022-11-25T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2022-11-26T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2022-11-27T00:00:00+00:00","rate":0.0,"value":"0"}]},{"period":"2022-11-21T00:00:00+00:00","frequency":"day","data":[{"date":"2022-11-21T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2022-11-22T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2022-11-23T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2022-11-24T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2022-11-25T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2022-11-26T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2022-11-27T00:00:00+00:00","rate":0.0,"value":"0"}]},{"period":"2022-11-22T00:00:00+00:00","frequency":"day","data":[{"date":"2022-11-22T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2022-11-23T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2022-11-24T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2022-11-25T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2022-11-26T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2022-11-27T00:00:00+00:00","rate":0.0,"value":"0"}]},{"period":"2022-11-23T00:00:00+00:00","frequency":"day","data":[{"date":"2022-11-23T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2022-11-24T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2022-11-25T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2022-11-26T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2022-11-27T00:00:00+00:00","rate":0.0,"value":"0"}]},{"period":"2022-11-24T00:00:00+00:00","frequency":"day","data":[{"date":"2022-11-24T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2022-11-25T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2022-11-26T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2022-11-27T00:00:00+00:00","rate":0.0,"value":"0"}]},{"period":"2022-11-25T00:00:00+00:00","frequency":"day","data":[{"date":"2022-11-25T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2022-11-26T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2022-11-27T00:00:00+00:00","rate":0.0,"value":"0"}]},{"period":"2022-11-26T00:00:00+00:00","frequency":"day","data":[{"date":"2022-11-26T00:00:00+00:00","rate":0.5,"value":"2"},{"date":"2022-11-27T00:00:00+00:00","rate":0.0,"value":"0"}]},{"period":"2022-11-27T00:00:00+00:00","frequency":"day","data":[{"date":"2022-11-27T00:00:00+00:00","rate":0.0,"value":"0"}]}]' 160 string: '[{"period":"2020-09-29T00:00:00+00:00","frequency":"day","data":[{"date":"2020-09-29T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2020-09-30T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2020-10-01T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2020-10-02T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2020-10-03T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2020-10-04T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2020-10-05T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2020-10-06T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2020-10-07T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2020-10-08T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2020-10-09T00:00:00+00:00","rate":0.0,"value":"0"}]},{"period":"2020-09-30T00:00:00+00:00","frequency":"day","data":[{"date":"2020-09-30T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2020-10-01T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2020-10-02T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2020-10-03T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2020-10-04T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2020-10-05T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2020-10-06T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2020-10-07T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2020-10-08T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2020-10-09T00:00:00+00:00","rate":0.0,"value":"0"}]},{"period":"2020-10-01T00:00:00+00:00","frequency":"day","data":[{"date":"2020-10-01T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2020-10-02T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2020-10-03T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2020-10-04T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2020-10-05T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2020-10-06T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2020-10-07T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2020-10-08T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2020-10-09T00:00:00+00:00","rate":0.0,"value":"0"}]},{"period":"2020-10-02T00:00:00+00:00","frequency":"day","data":[{"date":"2020-10-02T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2020-10-03T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2020-10-04T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2020-10-05T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2020-10-06T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2020-10-07T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2020-10-08T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2020-10-09T00:00:00+00:00","rate":0.0,"value":"0"}]},{"period":"2020-10-03T00:00:00+00:00","frequency":"day","data":[{"date":"2020-10-03T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2020-10-04T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2020-10-05T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2020-10-06T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2020-10-07T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2020-10-08T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2020-10-09T00:00:00+00:00","rate":0.0,"value":"0"}]},{"period":"2020-10-04T00:00:00+00:00","frequency":"day","data":[{"date":"2020-10-04T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2020-10-05T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2020-10-06T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2020-10-07T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2020-10-08T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2020-10-09T00:00:00+00:00","rate":0.0,"value":"0"}]},{"period":"2020-10-05T00:00:00+00:00","frequency":"day","data":[{"date":"2020-10-05T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2020-10-06T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2020-10-07T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2020-10-08T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2020-10-09T00:00:00+00:00","rate":0.0,"value":"0"}]},{"period":"2020-10-06T00:00:00+00:00","frequency":"day","data":[{"date":"2020-10-06T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2020-10-07T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2020-10-08T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2020-10-09T00:00:00+00:00","rate":0.0,"value":"0"}]},{"period":"2020-10-07T00:00:00+00:00","frequency":"day","data":[{"date":"2020-10-07T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2020-10-08T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2020-10-09T00:00:00+00:00","rate":0.0,"value":"0"}]},{"period":"2020-10-08T00:00:00+00:00","frequency":"day","data":[{"date":"2020-10-08T00:00:00+00:00","rate":0.0,"value":"0"},{"date":"2020-10-09T00:00:00+00:00","rate":0.0,"value":"0"}]},{"period":"2020-10-09T00:00:00+00:00","frequency":"day","data":[{"date":"2020-10-09T00:00:00+00:00","rate":0.0,"value":"0"}]}]'
161 headers: 161 headers:
162 Cache-Control: 162 Cache-Control:
163 - no-store 163 - no-store
164 Content-Security-Policy: 164 Content-Security-Policy:
165 - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src 165 - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src
166 ''self'' http://localhost:3000; img-src ''self'' https: data: blob: http://localhost:3000; 166 ''self'' http://localhost:3000; img-src ''self'' https: data: blob: http://localhost:3000;
167 style-src ''self'' http://localhost:3000 ''nonce-AkyM5KkEra/OBSMZSu3SqQ==''; 167 style-src ''self'' http://localhost:3000 ''nonce-ei/p9PPEqvg9vtmL9FKIAQ=='';
168 media-src ''self'' https: data: http://localhost:3000; frame-src ''self'' 168 media-src ''self'' https: data: http://localhost:3000; frame-src ''self''
169 https:; manifest-src ''self'' http://localhost:3000; connect-src ''self'' 169 https:; manifest-src ''self'' http://localhost:3000; connect-src ''self''
170 data: blob: http://localhost:3000 http://localhost:3000 ws://localhost:4000 170 data: blob: http://localhost:3000 http://localhost:3000 ws://localhost:4000
@@ -174,7 +174,7 @@ interactions:
174 Content-Type: 174 Content-Type:
175 - application/json; charset=utf-8 175 - application/json; charset=utf-8
176 ETag: 176 ETag:
177 - W/"c607f49eb27c19d561dab0434594a06e" 177 - W/"7c0b9d5d1e0b7ed4fc44340469c598c1"
178 Referrer-Policy: 178 Referrer-Policy:
179 - strict-origin-when-cross-origin 179 - strict-origin-when-cross-origin
180 Transfer-Encoding: 180 Transfer-Encoding:
@@ -190,9 +190,9 @@ interactions:
190 X-Permitted-Cross-Domain-Policies: 190 X-Permitted-Cross-Domain-Policies:
191 - none 191 - none
192 X-Request-Id: 192 X-Request-Id:
193 - 67a94c6b-e1fe-4c60-90c5-478c98e3e0f7 193 - 9804c083-8453-4e71-ae5e-602db2e2a232
194 X-Runtime: 194 X-Runtime:
195 - '0.435749' 195 - '0.174288'
196 X-XSS-Protection: 196 X-XSS-Protection:
197 - 1; mode=block 197 - 1; mode=block
198 status: 198 status:
diff --git a/tests/test_admin.py b/tests/test_admin.py
index 49d9876..f0aa1fc 100644
--- a/tests/test_admin.py
+++ b/tests/test_admin.py
@@ -140,8 +140,8 @@ def test_admin_domain_blocks(api2):
140@pytest.mark.vcr() 140@pytest.mark.vcr()
141def test_admin_stats(api2): 141def test_admin_stats(api2):
142 assert api2.admin_measures( 142 assert api2.admin_measures(
143 datetime.now() - timedelta(hours=24*5), 143 datetime(2020, 10, 10) - timedelta(hours=24*5),
144 datetime.now(), 144 datetime(2020, 10, 10),
145 active_users=True, 145 active_users=True,
146 new_users=True, 146 new_users=True,
147 opened_reports=True, 147 opened_reports=True,
@@ -158,8 +158,8 @@ def test_admin_stats(api2):
158 ) 158 )
159 159
160 assert api2.admin_dimensions( 160 assert api2.admin_dimensions(
161 datetime.now() - timedelta(hours=24*5), 161 datetime(2020, 10, 10) - timedelta(hours=24*5),
162 datetime.now(), 162 datetime(2020, 10, 10),
163 limit=3, 163 limit=3,
164 languages=True, 164 languages=True,
165 sources=True, 165 sources=True,
@@ -172,13 +172,13 @@ def test_admin_stats(api2):
172 ) 172 )
173 173
174 api2.admin_retention( 174 api2.admin_retention(
175 datetime.now() - timedelta(days=10), 175 datetime(2020, 10, 10) - timedelta(days=10),
176 datetime.now() 176 datetime(2020, 10, 10)
177 ) 177 )
178 178
179 with pytest.raises(MastodonIllegalArgumentError): 179 with pytest.raises(MastodonIllegalArgumentError):
180 api2.admin_retention( 180 api2.admin_retention(
181 datetime.now() - timedelta(days=10), 181 datetime(2020, 10, 10) - timedelta(days=10),
182 datetime.now(), 182 datetime(2020, 10, 10),
183 frequency="dayz" 183 frequency="dayz"
184 ) \ No newline at end of file 184 ) \ No newline at end of file
Powered by cgit v1.2.3 (git 2.41.0)