예제 #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)
예제 #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)
예제 #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'})
예제 #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'})