'Ensure ports are associated and moved across networks correctly.'

def test_update_port_network(self):

    self.agent._update_port_network(TEST_PORT_ID1, TEST_NETWORK_ID1)
    self.agent._update_port_network(TEST_PORT_ID2, TEST_NETWORK_ID1)
    self.agent._update_port_network(TEST_PORT_ID3, TEST_NETWORK_ID2)
    self.agent._update_port_network(TEST_PORT_ID1, TEST_NETWORK_ID2)
    self.assertEqual(set([TEST_PORT_ID2]), self.agent.network_ports[TEST_NETWORK_ID1])
    self.assertEqual(set([TEST_PORT_ID1, TEST_PORT_ID3]), self.agent.network_ports[TEST_NETWORK_ID2])
