use six.u rather than unicode for py3 compat
In Python 3 str is unicode by default and hence there is no unicode global function. This switches our use of it to to six.u() which handles the py2/py3 difference under the covers. Change-Id: I3cfff2fe8e07e2a9ed8b89c93d24351b1f440b00
This commit is contained in:
parent
c9a9b5d41a
commit
01aab63fc3
|
@ -20,6 +20,7 @@ import mock
|
|||
import netaddr
|
||||
from neutron_lib.api.definitions import portbindings
|
||||
from neutron_lib import constants as lib_constants
|
||||
import six
|
||||
import testtools
|
||||
|
||||
from neutron.agent.l3 import agent as neutron_l3_agent
|
||||
|
@ -1226,7 +1227,7 @@ class TestDvrRouter(framework.L3AgentTestFramework):
|
|||
ip_version=lib_constants.IP_VERSION_4,
|
||||
table=router_fip_table_idx,
|
||||
via=str(next_hop))
|
||||
expected_extra_route = [{'cidr': unicode(destination),
|
||||
expected_extra_route = [{'cidr': six.u(destination),
|
||||
'dev': fg_port_name,
|
||||
'table': router_fip_table_idx,
|
||||
'via': next_hop}]
|
||||
|
|
Loading…
Reference in New Issue