def setUp(self): self.mock_inbox_q = mock.Mock() self.mock_marathon_client = mock.Mock() with mock.patch( 'paasta_tools.deployd.watchers.get_marathon_client_from_config', autospec=True ): self.watcher = MaintenanceWatcher(self.mock_inbox_q, "westeros-prod")
def setUp(self): self.mock_inbox_q = mock.Mock() self.mock_marathon_client = mock.Mock() mock_config = mock.Mock(get_deployd_maintenance_polling_frequency=mock.Mock(return_value=20)) with mock.patch( 'paasta_tools.deployd.watchers.get_marathon_clients_from_config', autospec=True, ): self.watcher = MaintenanceWatcher(self.mock_inbox_q, "westeros-prod", config=mock_config)
def setUp(self): self.mock_instances_to_bounce = mock.Mock() self.mock_marathon_client = mock.Mock() mock_config = mock.Mock( get_deployd_maintenance_polling_frequency=mock.Mock( return_value=20), get_cluster=mock.Mock(return_value="clustername"), ) with mock.patch( "paasta_tools.deployd.watchers.get_marathon_clients_from_config", autospec=True, ): self.watcher = MaintenanceWatcher(self.mock_instances_to_bounce, "westeros-prod", config=mock_config)