aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/cassettes/test_instance_rules.yaml60
-rw-r--r--tests/test_instance.py4
2 files changed, 63 insertions, 1 deletions
diff --git a/tests/cassettes/test_instance_rules.yaml b/tests/cassettes/test_instance_rules.yaml
new file mode 100644
index 0000000..6e144b6
--- /dev/null
+++ b/tests/cassettes/test_instance_rules.yaml
@@ -0,0 +1,60 @@
1interactions:
2- request:
3 body: null
4 headers:
5 Accept:
6 - '*/*'
7 Accept-Encoding:
8 - gzip, deflate
9 Authorization:
10 - Bearer __MASTODON_PY_TEST_ACCESS_TOKEN
11 Connection:
12 - keep-alive
13 User-Agent:
14 - tests/v311
15 method: GET
16 uri: http://localhost:3000/api/v1/instance/rules
17 response:
18 body:
19 string: '[]'
20 headers:
21 Cache-Control:
22 - no-store
23 Content-Security-Policy:
24 - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src
25 ''self'' http://localhost:3000; img-src ''self'' https: data: blob: http://localhost:3000;
26 style-src ''self'' http://localhost:3000 ''nonce-VfLfKge8CLCQB9dJyA6/cA=='';
27 media-src ''self'' https: data: http://localhost:3000; frame-src ''self''
28 https:; manifest-src ''self'' http://localhost:3000; connect-src ''self''
29 data: blob: http://localhost:3000 http://localhost:3000 ws://localhost:4000
30 ws://localhost:3035 http://localhost:3035; script-src ''self'' ''unsafe-inline''
31 ''unsafe-eval'' http://localhost:3000; child-src ''self'' blob: http://localhost:3000;
32 worker-src ''self'' blob: http://localhost:3000'
33 Content-Type:
34 - application/json; charset=utf-8
35 ETag:
36 - W/"4f53cda18c2baa0c0354bb5f9a3ecbe5"
37 Referrer-Policy:
38 - strict-origin-when-cross-origin
39 Transfer-Encoding:
40 - chunked
41 Vary:
42 - Accept, Origin
43 X-Content-Type-Options:
44 - nosniff
45 X-Download-Options:
46 - noopen
47 X-Frame-Options:
48 - SAMEORIGIN
49 X-Permitted-Cross-Domain-Policies:
50 - none
51 X-Request-Id:
52 - 48fd3107-1ed2-4db1-8ae6-a62ac4897b98
53 X-Runtime:
54 - '0.036615'
55 X-XSS-Protection:
56 - 1; mode=block
57 status:
58 code: 200
59 message: OK
60version: 1
diff --git a/tests/test_instance.py b/tests/test_instance.py
index 3b42c3e..5f451c7 100644
--- a/tests/test_instance.py
+++ b/tests/test_instance.py
@@ -72,4 +72,6 @@ def test_directory(api):
72 assert isinstance(directory, list) 72 assert isinstance(directory, list)
73 assert len(directory) > 0 73 assert len(directory) > 0
74 74
75 75@pytest.mark.vcr()
76def test_instance_rules(api):
77 assert isinstance(api.instance_rules(), list)
Powered by cgit v1.2.3 (git 2.41.0)