def test_network_lifecycle(self):
        net = self.client.create_network(name=tests_base.get_rand_name())
        listed_networks = {x.id: x.name for x in self.client.get_networks()}
        self.assertIn(net.id, listed_networks)
        self.assertEqual(listed_networks[net.id], net.name,
                         'Listed network name is not as expected.')
        updated_name = 'new %s' + net.name
        updated_net = self.client.update_network(net.id, name=updated_name)
        self.assertEqual(updated_name, updated_net.name,
                         'Updated network name is not as expected.')
        self.client.delete_network(net.id)
        with testtools.ExpectedException(self.client.NotFound,
                                         msg='Network was not deleted'):
            self.client.get_network(net.id)
dataset/ETHPy150Open openstack/neutron/neutron/tests/retargetable/test_example.py/TestExample.test_network_lifecycle/operator `%` -> `+`