aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_streaming.py')
-rw-r--r--tests/test_streaming.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/test_streaming.py b/tests/test_streaming.py
index 883b773..33d1381 100644
--- a/tests/test_streaming.py
+++ b/tests/test_streaming.py
@@ -164,6 +164,16 @@ def test_invalid_event():
164 '', 164 '',
165 ]) 165 ])
166 166
167def test_invalid_json():
168 """But not too tolerant"""
169 listener = Listener()
170 with pytest.raises(MastodonMalformedEventError):
171 listener.handle_stream_([
172 'event: blahblah',
173 'data: {kjaslkdjalskdjasd asdkjhak ajdasldasd}',
174 '',
175 ])
176
167def test_missing_event_name(): 177def test_missing_event_name():
168 listener = Listener() 178 listener = Listener()
169 with pytest.raises(MastodonMalformedEventError): 179 with pytest.raises(MastodonMalformedEventError):
Powered by cgit v1.2.3 (git 2.41.0)