diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_streaming.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/test_streaming.py b/tests/test_streaming.py index 08d05b3..883b773 100644 --- a/tests/test_streaming.py +++ b/tests/test_streaming.py | |||
@@ -154,6 +154,15 @@ def test_unknown_event(): | |||
154 | assert listener.deletes == [] | 154 | assert listener.deletes == [] |
155 | assert listener.heartbeats == 0 | 155 | assert listener.heartbeats == 0 |
156 | 156 | ||
157 | def test_invalid_event(): | ||
158 | """But not too tolerant""" | ||
159 | listener = Listener() | ||
160 | with pytest.raises(MastodonMalformedEventError): | ||
161 | listener.handle_stream_([ | ||
162 | 'event: whatup', | ||
163 | 'data: {}', | ||
164 | '', | ||
165 | ]) | ||
157 | 166 | ||
158 | def test_missing_event_name(): | 167 | def test_missing_event_name(): |
159 | listener = Listener() | 168 | listener = Listener() |