tests: fix vlan test type from int to str

A trivial fix for tested vlan value, received from neutron, to be str instead
of int

Change-Id: I21b330f065809d5ec50f5376b07040bfc9258991
This commit is contained in:
Vladik Romanovsky 2017-02-07 20:33:45 -05:00
parent d48aeb5783
commit cd9d0fdbaa
2 changed files with 3 additions and 3 deletions

View File

@ -1585,7 +1585,7 @@ class LibvirtConnTestCase(test.NoDBTestCase):
network_info = _fake_network_info(self, 4)
network_info[0]['vnic_type'] = network_model.VNIC_TYPE_DIRECT_PHYSICAL
network_info[0]['address'] = "51:5a:2c:a4:5e:1b"
network_info[0]['details'] = dict(vlan=2145)
network_info[0]['details'] = dict(vlan='2145')
instance_ref.info_cache = objects.InstanceInfoCache(
network_info=network_info)

View File

@ -38,7 +38,7 @@ class TestNetUtilsTestCase(test.NoDBTestCase):
network_info[1]['vnic_type'] = network_model.VNIC_TYPE_DIRECT_PHYSICAL
network_info[1]['address'] = "fa:16:3e:d1:28:e4"
network_info[1]['details'] = dict(vlan=2145)
expected = {'fa:16:3e:d1:28:e4': 2145}
network_info[1]['details'] = dict(vlan='2145')
expected = {'fa:16:3e:d1:28:e4': '2145'}
self.assertEqual(expected,
netutils.get_cached_vifs_with_vlan(network_info))