Use six.text_type instead of unicode
Use six.text_type instead of unicode for python34-support. Change-Id: I2782cd25749833c51d6a970654f8b5234f9aa064
This commit is contained in:
parent
a636af4e30
commit
24c9d87b68
|
@ -108,11 +108,7 @@ class TestRyuBgpDriver(base.BaseTestCase):
|
|||
self.ryu_bgp_driver.add_bgp_speaker(FAKE_LOCAL_AS1)
|
||||
self.assertEqual(1,
|
||||
self.ryu_bgp_driver.cache.get_hosted_bgp_speakers_count())
|
||||
# In Python3 a str is unicode
|
||||
if six.PY3:
|
||||
NEW_FAKE_PEER_PASSWORD = str(FAKE_PEER_PASSWORD)
|
||||
else:
|
||||
NEW_FAKE_PEER_PASSWORD = unicode(FAKE_PEER_PASSWORD)
|
||||
NEW_FAKE_PEER_PASSWORD = six.text_type(FAKE_PEER_PASSWORD)
|
||||
self.ryu_bgp_driver.add_bgp_peer(
|
||||
FAKE_LOCAL_AS1,
|
||||
FAKE_PEER_IP,
|
||||
|
|
Loading…
Reference in New Issue