Commit 2d5492bd authored by Tres Seaver's avatar Tres Seaver

Use bytes literals for _p_oid values.

parent 0e821686
......@@ -1783,7 +1783,7 @@ class Test_Tree(unittest.TestCase):
def test__set_calls_readCurrent_on_jar(self):
tree = self._makeOne()
tree._p_oid = 'OID'
tree._p_oid = b'OID'
tree._p_serial = '01234567'
tree._p_jar = jar = _Jar()
tree._set('a', 'b')
......@@ -1839,7 +1839,7 @@ class Test_Tree(unittest.TestCase):
def test__del_calls_readCurrent_on_jar(self):
tree = self._makeOne({'a': 'b'})
tree._p_oid = 'OID'
tree._p_oid = b'OID'
tree._p_serial = '01234567'
tree._p_jar = jar = _Jar()
tree._del('a')
......@@ -1898,7 +1898,7 @@ class Test_Tree(unittest.TestCase):
bucket = tree._firstbucket
jar = _Jar()
bucket._p_jar = jar
bucket._p_oid = 'OID'
bucket._p_oid = b'OID'
self.assertEqual(tree.__getstate__(), ((bucket,), bucket))
def test___getstate___multiple_buckets(self):
......
......@@ -149,10 +149,10 @@ class Test_type_and_adr(unittest.TestCase):
def test_type_and_adr_w_oid(self):
from BTrees.utils import oid_repr
class WithOid(object):
_p_oid = 'DEADBEEF'
_p_oid = b'DEADBEEF'
t_and_a = self._callFUT(WithOid())
self.assertTrue(t_and_a.startswith('WithOid (0x'))
self.assertTrue(t_and_a.endswith('oid=%s)' % oid_repr('DEADBEEF')))
self.assertTrue(t_and_a.endswith('oid=%s)' % oid_repr(b'DEADBEEF')))
def test_type_and_adr_wo_oid(self):
class WithoutOid(object):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment