Ejemplo n.º 1
0
 def test_pre_delete(self):
     LoadBalancer.pre_delete(Mock(), self.lb)
     self.client.remove_group.assert_called_with(self.lb.group.pk)
     config = self.lb.group.environment.system.config_manager
     config.delete.assert_called_with(self.lb.config_key)
     self.lb.backend.delete_lb.assert_called_with(self.lb)
Ejemplo n.º 2
0
 def test_pre_delete(self):
     LoadBalancer.pre_delete(Mock(), self.lb)
     self.client.remove_group.assert_called_with(self.lb.group.pk)
     config = self.lb.group.environment.system.config_manager
     config.delete.assert_called_with(self.lb.config_key)
     self.lb.backend.delete_lb.assert_called_with(self.lb)
Ejemplo n.º 3
0
 def create_lb(self):
     with self.patch_lb('backend') as backend:
         backend.create_lb.return_value = ('2.2.2.2', 443)
         return LoadBalancer.create(self.group, 'p', 'http', {'k': 'v'})
Ejemplo n.º 4
0
 def create_lb(self):
     with self.patch_lb('backend') as backend:
         backend.create_lb.return_value = ('2.2.2.2', 443)
         return LoadBalancer.create(self.group, 'p', 'http', {'k': 'v'})