fix tests

This commit is contained in:
INADA Naoki
2016-01-10 15:09:41 +09:00
parent 9888906a6d
commit eb01869a42
2 changed files with 4 additions and 3 deletions

View File

@@ -32,7 +32,8 @@ class DatabaseTest(unittest.TestCase):
self.BLOBUText = unicode().join(unichr(i) for i in range(16834))
else:
self.BLOBUText = "".join(chr(i) for i in range(16834))
self.BLOBBinary = self.db_module.Binary(''.join([chr(i) for i in range(256)] * 16))
data = bytearray(range(256)) * 16
self.BLOBBinary = self.db_module.Binary(data)
leak_test = True

View File

@@ -827,8 +827,8 @@ class DatabaseAPI20Test(unittest.TestCase):
# self.assertEqual(str(t1),str(t2))
def test_Binary(self):
b = self.driver.Binary('Something')
b = self.driver.Binary('')
b = self.driver.Binary(b'Something')
b = self.driver.Binary(b'')
def test_STRING(self):
self.assertTrue(hasattr(self.driver,'STRING'),