def setUp(self):
     super(TestUnsetSubnetPool, self).setUp()
     self._subnetpool = network_fakes.FakeSubnetPool.create_one_subnet_pool(
         {'tags': ['green', 'red']})
     self.network.find_subnet_pool = mock.Mock(
         return_value=self._subnetpool)
     self.network.update_subnet_pool = mock.Mock(return_value=None)
     self.network.set_tags = mock.Mock(return_value=None)
     # Get the command object to test
     self.cmd = subnet_pool.UnsetSubnetPool(self.app, self.namespace)
示例#2
0
 def setUp(self):
     super(TestUnsetSubnetPool, self).setUp()
     self._subnetpool = network_fakes.FakeSubnetPool.create_one_subnet_pool(
         {
             'prefixes': ['10.0.10.0/24', '10.1.10.0/24', '10.2.10.0/24'],
         })
     self.network.find_subnet_pool = mock.Mock(
         return_value=self._subnetpool)
     self.network.update_subnet_pool = mock.Mock(return_value=None)
     # Get the command object to test
     self.cmd = subnet_pool.UnsetSubnetPool(self.app, self.namespace)