

@mock.patch('awscli.customizations.emr.sshutils.emrutils')
def test_validate_and_find_master_dns_waits(self, emrutils):
    emrutils.get_cluster_state.return_value = 'STARTING'
    session = mock.Mock()
    client = mock.Mock()
    emrutils.get_client.return_value = client
    sshutils.validate_and_find_master_dns(session, None, 'cluster-id')
    client.get_waiter.assert_called_with('cluster_running')
    client.get_waiter.return_value.wait.assert_called_with(ClusterId='cluster-id')
    self.assertTrue(emrutils.find_master_dns.called)

dataset/ETHPy150Open aws/aws-cli/tests/unit/customizations/emr/test_sshutils.py TestSSHUtils.test_validate_and_find_master_dns_waits/original