aboutsummaryrefslogtreecommitdiff
path: root/tests/unit/views
diff options
context:
space:
mode:
authorDaniel Schadt <kingdread@gmx.de>2022-07-17 20:56:38 +0200
committerDaniel Schadt <kingdread@gmx.de>2022-07-17 20:56:38 +0200
commit69c9167911a8449fef20951abe924a1c4528545c (patch)
tree95b840058d8abf78e7b0fdd0331a0b86fef7b6d3 /tests/unit/views
parentd8ba9371656f9bd1492b9fbe13234f216ebbd240 (diff)
downloadfietsboek-69c9167911a8449fef20951abe924a1c4528545c.tar.gz
fietsboek-69c9167911a8449fef20951abe924a1c4528545c.tar.bz2
fietsboek-69c9167911a8449fef20951abe924a1c4528545c.zip
add tests for archive download
Diffstat (limited to 'tests/unit/views')
-rw-r--r--tests/unit/views/test_browse.py14
1 files changed, 14 insertions, 0 deletions
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"