def test_warning_in_swarm_mode(self): mock_client = mock.create_autospec(docker.APIClient) mock_client.info.return_value = {'Swarm': {'LocalNodeState': 'active'}} with mock.patch('compose.cli.main.log') as fake_log: warn_for_swarm_mode(mock_client) assert fake_log.warn.call_count == 1
def test_warning_in_swarm_mode(self): mock_client = mock.create_autospec(docker.APIClient) mock_client.info.return_value = {'Swarm': {'LocalNodeState': 'active'}} with mock.patch('compose.cli.main.log') as fake_log: warn_for_swarm_mode(mock_client) assert fake_log.warning.call_count == 1