diff options
author | Cristobal <cganterh@gmail.com> | 2015-03-02 21:00:03 -0300 |
---|---|---|
committer | Cristobal <cganterh@gmail.com> | 2015-03-02 21:00:03 -0300 |
commit | 1cf37bd8f5ddc8ac629b07031f7c5341840b5b7e (patch) | |
tree | 7fcc9bd1a86db18b81645657585f01606edb388a | |
parent | 93ba12c7d7483af5374ba5f0e62a46ddc5e1ffe2 (diff) | |
download | httplib2-1cf37bd8f5ddc8ac629b07031f7c5341840b5b7e.tar.gz |
Added unit test for _convert_byte_str in python3/httplib2test.py.
-rwxr-xr-x | python3/httplib2test.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/python3/httplib2test.py b/python3/httplib2test.py index 5f786bd..246956a 100755 --- a/python3/httplib2test.py +++ b/python3/httplib2test.py @@ -1235,6 +1235,12 @@ class HttpPrivateTest(unittest.TestCase): self.assertTrue('cache-control' in h)
self.assertTrue('other' in h)
self.assertEqual('Stuff', h['other'])
+
+ def testConvertByteStr(self):
+ with self.assertRaises(TypeError):
+ httplib2._convert_byte_str(4)
+ self.assertEqual('Hello World', httplib2._convert_byte_str(b'Hello World'))
+ self.assertEqual('Bye World', httplib2._convert_byte_str('Bye World'))
def testExpirationModelTransparent(self):
# Test that no-cache makes our request TRANSPARENT
|