From 69c9167911a8449fef20951abe924a1c4528545c Mon Sep 17 00:00:00 2001 From: Daniel Schadt Date: Sun, 17 Jul 2022 20:56:38 +0200 Subject: add tests for archive download --- tests/unit/views/test_browse.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 tests/unit/views/test_browse.py (limited to 'tests/unit/views') diff --git a/tests/unit/views/test_browse.py b/tests/unit/views/test_browse.py new file mode 100644 index 0000000..93eb0ae --- /dev/null +++ b/tests/unit/views/test_browse.py @@ -0,0 +1,14 @@ +from fietsboek.views.browse import Stream + + +class TestStream: + def test_write(self): + stream = Stream() + n = stream.write(b"foobar") + assert n == 6 + + def test_write_read(self): + stream = Stream() + stream.write(b"foo") + stream.write(b"bar") + assert stream.readall() == b"foobar" -- cgit v1.2.3