summaryrefslogtreecommitdiff
path: root/gitdb/test
diff options
context:
space:
mode:
authorKevin Brown <kevin@kevinbrown.in>2014-07-16 20:36:02 -0400
committerKevin Brown <kevin@kevinbrown.in>2014-07-16 20:36:02 -0400
commitecdae96cdb8bbde322f59fd119dab302e7797c18 (patch)
treea52dc56b4d749c5ea264d4c8ab96b8140d92bfab /gitdb/test
parent0465cf327d232101b2de69d714a468b7e1a66a74 (diff)
downloadgitdb-ecdae96cdb8bbde322f59fd119dab302e7797c18.tar.gz
Fixed a few more encoding issues
Bytes should always be returned from the streams, so the tests should be checking against byte strings instead of text strings. This also fixes the `sha_iter` as it relied on the Python 2 `iterkeys` which has been renamed to `keys` in Python 3.
Diffstat (limited to 'gitdb/test')
-rw-r--r--gitdb/test/db/lib.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/gitdb/test/db/lib.py b/gitdb/test/db/lib.py
index d0028b8..38747de 100644
--- a/gitdb/test/db/lib.py
+++ b/gitdb/test/db/lib.py
@@ -21,6 +21,7 @@ from gitdb.base import (
from gitdb.exc import BadObject
from gitdb.typ import str_blob_type
+from gitdb.utils.encoding import force_bytes
from async import IteratorReader
@@ -97,7 +98,7 @@ class TestDBBase(TestBase):
assert info.size == len(data)
ostream = db.stream(sha)
- assert ostream.read() == data
+ assert ostream.read() == force_bytes(data)
assert ostream.type == str_blob_type
assert ostream.size == len(data)
else: