Exemplo n.º 1
0
 def test_network_update(self):
     network = dbapi.networks_create(self.context, network1)
     res = dbapi.networks_get_by_id(self.context, network.id)
     self.assertEqual(res.name, 'test network')
     new_name = 'test_network1'
     res = dbapi.networks_update(self.context, res.id,
                                 {'name': 'test_network1'})
     self.assertEqual(res.name, new_name)
Exemplo n.º 2
0
 def test_networks_delete(self):
     network = dbapi.networks_create(self.context, network1)
     # First make sure we have the network created
     res = dbapi.networks_get_by_id(self.context, network.id)
     self.assertEqual(res.id, network.id)
     # Delete the network
     dbapi.networks_delete(self.context, res.id)
     self.assertRaises(exceptions.NotFound, dbapi.networks_get_by_id,
                       self.context, res.id)
Exemplo n.º 3
0
 def test_networks_delete(self):
     network = dbapi.networks_create(self.context, network1)
     # First make sure we have the network created
     res = dbapi.networks_get_by_id(self.context, network.id)
     self.assertEqual(res.id, network.id)
     # Delete the network
     dbapi.networks_delete(self.context, res.id)
     self.assertRaises(exceptions.NotFound, dbapi.networks_get_by_id,
                       self.context, res.id)
Exemplo n.º 4
0
 def test_networks_get_by_id(self):
     network = dbapi.networks_create(self.context, network1)
     res = dbapi.networks_get_by_id(self.context, network.id)
     self.assertEqual(res.name, 'test network')
Exemplo n.º 5
0
 def test_networks_get_by_id(self):
     network = dbapi.networks_create(self.context, network1)
     res = dbapi.networks_get_by_id(self.context, network.id)
     self.assertEqual(res.name, 'test network')