File size: 331 Bytes
fc0f7bd | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | import io
import pytest
from falcon.request_helpers import BoundedStream
@pytest.fixture
def bounded_stream():
return BoundedStream(io.BytesIO(), 1024)
def test_not_writeable(bounded_stream):
assert not bounded_stream.writeable()
with pytest.raises(IOError):
bounded_stream.write(b'something something')
|