test_i2p_provider: exercise escaping of apiEndpoint attribute

This commit is contained in:
Brian Warner 2017-08-16 22:46:05 -07:00
parent 1f1afe65ec
commit a1711088ed

View File

@ -311,7 +311,7 @@ class ProviderListener(unittest.TestCase):
p = i2p_provider.Provider("basedir",
FakeConfig(**{
"i2p.configdir": "configdir",
"sam.port": "goodport",
"sam.port": "good:port",
"dest": "true",
"dest.port": "3457",
"dest.private_key_file": privkeyfile,
@ -319,7 +319,7 @@ class ProviderListener(unittest.TestCase):
reactor)
endpoint_or_description = p.get_listener()
self.assertEqual(endpoint_or_description,
"i2p:%s:3457:api=SAM:apiEndpoint=goodport" % privkeyfile)
"i2p:%s:3457:api=SAM:apiEndpoint=good\\:port" % privkeyfile)
class Provider_CheckI2PConfig(unittest.TestCase):
def test_default(self):