def test_update(self):
    old_port_dict = self.port.neutron_port_dict
    new_port_dict = old_port_dict.copy()
    added_ips = [1, 2, 3]
    new_port_dict.update({'fixed_ips': added_ips, 'allowed_address_pairs': [{'mac_address': '00:00:00:00:00:01', 'ip_address': '192.168.0.1'}, {'mac_address': '00:00:00:00:00:01', 'ip_address': '0000:0000:0000:0000:0000:0000:0000:0000'}]})
    self.port.update(new_port_dict)
    self.assertEqual(new_port_dict, self.port.neutron_port_dict)
    self.assertIsNot(new_port_dict, self.port.neutron_port_dict)
    self.assertEqual(added_ips, self.port.fixed_ips)
    self.assertEqual({('00:00:00:00:00:01', '192.168.0.1')}, self.port.allowed_pairs_v4)
    self.assertIn(('00:00:00:00:00:01', '0000:0000:0000:0000:0000:0000:0000:0000'), self.port.allowed_pairs_v6)
def test_update(self):
    old_port_dict = self.port.neutron_port_dict
    new_port_dict = old_port_dict.copy()
    added_ips = [1, 2, 3]
    new_port_dict.update({'fixed_ips': added_ips, 'allowed_address_pairs': [{'mac_address': '00:00:00:00:00:01', 'ip_address': '192.168.0.1'}, {'mac_address': '00:00:00:00:00:01', 'ip_address': '0000:0000:0000:0000:0000:0000:0000:0000'}]})
    self.port.update(new_port_dict)
    self.assertEqual(new_port_dict, self.port.neutron_port_dict)
    self.assertIsNot(new_port_dict, self.port.neutron_port_dict)
    self.assertEqual(added_ips, self.port.fixed_ips)
    self.assertEqual({('00:00:00:00:00:01', '192.168.0.1')}, self.port.allowed_pairs_v4)
    self.assertIn(('00:00:00:00:00:01', '0000:0000:0000:0000:0000:0000:0000:0000'), self.port.allowed_pairs_v6)