Add emoji test

This commit is contained in:
Lorenz Diener 2018-05-06 15:52:55 +02:00
pare ba2fccc1cf
commit fbd4122fec
S'han modificat 2 arxius amb 31 adicions i 1 eliminacions

Veure arxiu

@ -0,0 +1,27 @@
interactions:
- request:
body: null
headers:
Accept: ['*/*']
Accept-Encoding: ['gzip, deflate']
Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
Connection: [keep-alive]
User-Agent: [python-requests/2.9.1]
method: GET
uri: http://localhost:3000/api/v1/custom_emojis
response:
body: {string: '[]'}
headers:
Cache-Control: ['max-age=0, private, must-revalidate']
Content-Type: [application/json; charset=utf-8]
ETag: [W/"ea5c10937cbba90ee4e0577b7d86961c"]
Transfer-Encoding: [chunked]
Vary: ['Accept-Encoding, Origin']
X-Content-Type-Options: [nosniff]
X-Frame-Options: [SAMEORIGIN]
X-Request-Id: [b4431da4-958a-4fe3-8129-ac05eefacb5c]
X-Runtime: ['0.029122']
X-XSS-Protection: [1; mode=block]
content-length: ['2']
status: {code: 200, message: OK}
version: 1

Veure arxiu

@ -28,4 +28,7 @@ def test_instance_peers(api):
def test_low_version(api_low_version): def test_low_version(api_low_version):
with pytest.raises(MastodonVersionError): with pytest.raises(MastodonVersionError):
instance = api_low_version.instance() instance = api_low_version.instance()
@pytest.mark.vcr()
def test_emoji(api):
assert len(api.custom_emojis()) == 0