aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLorenz Diener <[email protected]>2018-05-06 15:52:55 +0200
committerLorenz Diener <[email protected]>2018-05-06 15:52:55 +0200
commitfbd4122fec092bff6b1cc9f44dfeda6ee693c41b (patch)
tree129a99c02d5e3aacf14e2c1cc6d7a7e9eb981121 /tests
parentba2fccc1cf0957387f616da64c20e329eba95263 (diff)
downloadmastodon.py-fbd4122fec092bff6b1cc9f44dfeda6ee693c41b.tar.gz
Add emoji test
Diffstat (limited to 'tests')
-rw-r--r--tests/cassettes/test_emoji.yaml27
-rw-r--r--tests/test_instance.py5
2 files changed, 31 insertions, 1 deletions
diff --git a/tests/cassettes/test_emoji.yaml b/tests/cassettes/test_emoji.yaml
new file mode 100644
index 0000000..8d83735
--- /dev/null
+++ b/tests/cassettes/test_emoji.yaml
@@ -0,0 +1,27 @@
1interactions:
2- request:
3 body: null
4 headers:
5 Accept: ['*/*']
6 Accept-Encoding: ['gzip, deflate']
7 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
8 Connection: [keep-alive]
9 User-Agent: [python-requests/2.9.1]
10 method: GET
11 uri: http://localhost:3000/api/v1/custom_emojis
12 response:
13 body: {string: '[]'}
14 headers:
15 Cache-Control: ['max-age=0, private, must-revalidate']
16 Content-Type: [application/json; charset=utf-8]
17 ETag: [W/"ea5c10937cbba90ee4e0577b7d86961c"]
18 Transfer-Encoding: [chunked]
19 Vary: ['Accept-Encoding, Origin']
20 X-Content-Type-Options: [nosniff]
21 X-Frame-Options: [SAMEORIGIN]
22 X-Request-Id: [b4431da4-958a-4fe3-8129-ac05eefacb5c]
23 X-Runtime: ['0.029122']
24 X-XSS-Protection: [1; mode=block]
25 content-length: ['2']
26 status: {code: 200, message: OK}
27version: 1
diff --git a/tests/test_instance.py b/tests/test_instance.py
index e8be86f..199e654 100644
--- a/tests/test_instance.py
+++ b/tests/test_instance.py
@@ -28,4 +28,7 @@ def test_instance_peers(api):
28def test_low_version(api_low_version): 28def test_low_version(api_low_version):
29 with pytest.raises(MastodonVersionError): 29 with pytest.raises(MastodonVersionError):
30 instance = api_low_version.instance() 30 instance = api_low_version.instance()
31 \ No newline at end of file 31
32@pytest.mark.vcr()
33def test_emoji(api):
34 assert len(api.custom_emojis()) == 0 \ No newline at end of file
Powered by cgit v1.2.3 (git 2.41.0)