part of #3613: fix get_host_info() usage of base64.encodestring().

This commit is contained in:
Georg Brandl 2009-02-13 10:50:01 +00:00
parent 35e2c4e67a
commit c8dcfb6cec
2 changed files with 10 additions and 1 deletions

View file

@ -135,6 +135,14 @@ class XMLRPCTestCase(unittest.TestCase):
xmlrpclib.loads(strg)[0][0])
self.assertRaises(TypeError, xmlrpclib.dumps, (arg1,))
def test_get_host_info(self):
# see bug #3613, this raised a TypeError
transp = xmlrpc.client.Transport()
self.assertEquals(transp.get_host_info("user@host.tld"),
('host.tld',
[('Authorization', 'Basic dXNlcg==')], {}))
class HelperTestCase(unittest.TestCase):
def test_escape(self):
self.assertEqual(xmlrpclib.escape("a&b"), "a&b")