diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/cassettes/test_admin_stats.yaml | 22 | ||||
-rw-r--r-- | tests/test_admin.py | 2 |
2 files changed, 12 insertions, 12 deletions
diff --git a/tests/cassettes/test_admin_stats.yaml b/tests/cassettes/test_admin_stats.yaml index 6a72c83..b6640b5 100644 --- a/tests/cassettes/test_admin_stats.yaml +++ b/tests/cassettes/test_admin_stats.yaml | |||
@@ -34,7 +34,7 @@ interactions: | |||
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-WiDzKVOhti4HVtIse/Oj6w==''; | 37 | style-src ''self'' http://localhost:3000 ''nonce-pLNIu4cTGeZNShQzE6Mr6A==''; |
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 |
@@ -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 | - 07db387f-9f34-4f15-8635-21a9850d96b3 | 63 | - 9bb14b28-e333-4622-8543-72e227798142 |
64 | X-Runtime: | 64 | X-Runtime: |
65 | - '0.082628' | 65 | - '0.045234' |
66 | X-XSS-Protection: | 66 | X-XSS-Protection: |
67 | - 1; mode=block | 67 | - 1; mode=block |
68 | status: | 68 | status: |
@@ -93,7 +93,7 @@ interactions: | |||
93 | response: | 93 | response: |
94 | body: | 94 | body: |
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 | 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":"1569560","unit":"bytes","human_value":"1.5 | 96 | MB"},{"key":"redis","human_key":"Redis","value":"1578304","unit":"bytes","human_value":"1.51 |
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-8BlKJ/uomeClHGm07flBKg==''; | 105 | style-src ''self'' http://localhost:3000 ''nonce-lYcOOZdF8g1x01AuzWUDlw==''; |
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/"2d84840d6cd38577ff002ff961df6a42" | 115 | - W/"46fcf41cc9d3511d163da389677e3711" |
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,9 +128,9 @@ 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 | - 3837d91b-a8b1-4fb9-a04b-2e85c1d70cd6 | 131 | - 81474146-c231-4e87-bcf2-4c8c9e0820a6 |
132 | X-Runtime: | 132 | X-Runtime: |
133 | - '0.029226' | 133 | - '0.021599' |
134 | X-XSS-Protection: | 134 | X-XSS-Protection: |
135 | - 1; mode=block | 135 | - 1; mode=block |
136 | status: | 136 | status: |
@@ -164,7 +164,7 @@ interactions: | |||
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-ei/p9PPEqvg9vtmL9FKIAQ==''; | 167 | style-src ''self'' http://localhost:3000 ''nonce-2xg25WaYc3aKM+kQs5rcjw==''; |
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 |
@@ -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 | - 9804c083-8453-4e71-ae5e-602db2e2a232 | 193 | - 6779b4e9-ede8-4de4-84c9-fcc3458a5e53 |
194 | X-Runtime: | 194 | X-Runtime: |
195 | - '0.174288' | 195 | - '0.135966' |
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 f0aa1fc..d937ed8 100644 --- a/tests/test_admin.py +++ b/tests/test_admin.py | |||
@@ -137,7 +137,7 @@ def test_admin_domain_blocks(api2): | |||
137 | api2.admin_delete_domain_block(block2) | 137 | api2.admin_delete_domain_block(block2) |
138 | assert not block3.id in map(lambda x: x.id, api2.admin_domain_blocks()) | 138 | assert not block3.id in map(lambda x: x.id, api2.admin_domain_blocks()) |
139 | 139 | ||
140 | @pytest.mark.vcr() | 140 | @pytest.mark.vcr(match_on=['path']) |
141 | def test_admin_stats(api2): | 141 | def test_admin_stats(api2): |
142 | assert api2.admin_measures( | 142 | assert api2.admin_measures( |
143 | datetime(2020, 10, 10) - timedelta(hours=24*5), | 143 | datetime(2020, 10, 10) - timedelta(hours=24*5), |