<commit_before># -*- coding: utf-8 -*-

""" Functionality related to unit tests with un-managed resources mocked. """
# setup testing framework
from unittest import TestCase, main
from mock import patch
from ConfigParser import RawConfigParser, NoSectionError
from kamaki.clients.utils import https
https.patch_with_certs(CA_CERTS_PATH)

# get relative path references so imports will work,
# even if __init__.py is missing (/tests is a simple directory not a module)
import sys
from os.path import join, dirname, abspath

sys.path.append(join(dirname(abspath(__file__)), '..'))

# import objects we aim to test
# from create_bare_cluster import create_cluster
from create_cluster import YarnCluster, ClientError
from cluster_errors_constants import error_quotas_cluster_size, error_quotas_network, \
    error_get_ip, error_quotas_cpu, error_quotas_ram, error_quotas_cyclades_disk

def mock_createcluster(*args):
    """ :returns proper master_ip and image list types with dummy values. """
    print 'in mock create cluster'<commit_msg>fix for last<commit_after># -*- coding: utf-8 -*-

""" Functionality related to unit tests with un-managed resources mocked. """
# setup testing framework
from unittest import TestCase, main
from mock import patch
from ConfigParser import RawConfigParser, NoSectionError
from kamaki.clients.utils import https
https.patch_ignore_ssl()

# get relative path references so imports will work,
# even if __init__.py is missing (/tests is a simple directory not a module)
import sys
from os.path import join, dirname, abspath

sys.path.append(join(dirname(abspath(__file__)), '..'))

# import objects we aim to test
# from create_bare_cluster import create_cluster
from create_cluster import YarnCluster, ClientError
from cluster_errors_constants import error_quotas_cluster_size, error_quotas_network, \
    error_get_ip, error_quotas_cpu, error_quotas_ram, error_quotas_cyclades_disk

def mock_createcluster(*args):
    """ :returns proper master_ip and image list types with dummy values. """
    print 'in mock create cluster'
{'fraction_non_alphanumeric': 0.07371483996120272, 'fraction_numerical': 0.0009699321047526673, 'mean_word_length': 5.676375404530744, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '898864', 'n_tokens_mistral': 580, 'n_tokens_neox': 579, 'n_words': 211}