diff options
author | Lorenz Diener <[email protected]> | 2018-01-29 11:18:37 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2018-01-29 11:18:37 +0100 |
commit | 42b1d8fa5895f416853311db220cf9412ad8fd13 (patch) | |
tree | cc8615955cba00aa7ba224733e3371379bbfb855 /tests/test_status.py | |
parent | 1d54c35101a6c349e457e7b708e29db15242a139 (diff) | |
parent | 56e6bac9cb19101346cb42b73628290740889ecf (diff) | |
download | mastodon.py-42b1d8fa5895f416853311db220cf9412ad8fd13.tar.gz |
Merge pull request #118 from codl/subclass-api-errors
Subclass api errors
Diffstat (limited to 'tests/test_status.py')
-rw-r--r-- | tests/test_status.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/test_status.py b/tests/test_status.py index b177517..2e129ac 100644 --- a/tests/test_status.py +++ b/tests/test_status.py | |||
@@ -1,6 +1,5 @@ | |||
1 | import pytest | 1 | import pytest |
2 | from mastodon.Mastodon import MastodonAPIError | 2 | from mastodon.Mastodon import MastodonAPIError, MastodonNotFoundError |
3 | from time import sleep | ||
4 | 3 | ||
5 | @pytest.mark.vcr() | 4 | @pytest.mark.vcr() |
6 | def test_status(status, api): | 5 | def test_status(status, api): |
@@ -14,7 +13,7 @@ def test_status_empty(api): | |||
14 | 13 | ||
15 | @pytest.mark.vcr() | 14 | @pytest.mark.vcr() |
16 | def test_status_missing(api): | 15 | def test_status_missing(api): |
17 | with pytest.raises(MastodonAPIError): | 16 | with pytest.raises(MastodonNotFoundError): |
18 | api.status(0) | 17 | api.status(0) |
19 | 18 | ||
20 | @pytest.mark.skip(reason="Doesn't look like mastodon will make a card for an url that doesn't have a TLD, and relying on some external website being reachable to make a card of is messy :/") | 19 | @pytest.mark.skip(reason="Doesn't look like mastodon will make a card for an url that doesn't have a TLD, and relying on some external website being reachable to make a card of is messy :/") |