kopia lustrzana https://github.com/halcy/Mastodon.py
temporary: try to make CI happy
rodzic
945e8e670d
commit
0f89d17812
|
@ -94,6 +94,9 @@ class Listener(StreamListener):
|
||||||
|
|
||||||
def handle_stream_(self, lines):
|
def handle_stream_(self, lines):
|
||||||
"""Test helper to avoid littering all tests with six.b()."""
|
"""Test helper to avoid littering all tests with six.b()."""
|
||||||
|
def six_b(s):
|
||||||
|
return s.encode("latin-1")
|
||||||
|
|
||||||
class MockResponse():
|
class MockResponse():
|
||||||
def __init__(self, data):
|
def __init__(self, data):
|
||||||
self.data = data
|
self.data = data
|
||||||
|
@ -105,7 +108,7 @@ class Listener(StreamListener):
|
||||||
bytearr.append(byte)
|
bytearr.append(byte)
|
||||||
yield(bytearr)
|
yield(bytearr)
|
||||||
yield(b'\n')
|
yield(b'\n')
|
||||||
return self.handle_stream(MockResponse(map(bytes, lines)))
|
return self.handle_stream(MockResponse(map(six_b, lines)))
|
||||||
|
|
||||||
|
|
||||||
def test_heartbeat():
|
def test_heartbeat():
|
||||||
|
|
Ładowanie…
Reference in New Issue