<commit_before>import httplib2
from time import time

from testconfig import config

def clear_users():
    username = config['cheddar']['username']
    password = config['<PASSWORD>']['password']
    product = config['cheddar']['product_code']
    endpoint = config['cheddar']['endpoint']

    h = httplib2.Http()
    h.add_credentials(username, password)

    url = '%s/customers/delete-all/confirm/%d/productCode/%s' % (endpoint, int(time()), product)

    response, content = h.request(url, 'POST')

    if response.status != 200:
        raise Exception('Could not clear users.  Recieved a response of %s %s ' % (response.status, response.reason))<commit_msg>Also consider clearing customers a failure if success is not in the results. Related to a specific cheddar bug where it only returns .<commit_after>import httplib2
from time import time

from testconfig import config

def clear_users():
    username = config['cheddar']['username']
    password = config['<PASSWORD>']['password']
    product = config['cheddar']['product_code']
    endpoint = config['cheddar']['endpoint']

    h = httplib2.Http()
    h.add_credentials(username, password)

    url = '%s/customers/delete-all/confirm/%d/productCode/%s' % (endpoint, int(time()), product)

    response, content = h.request(url, 'POST')

    if response.status != 200 or 'success' not in content:
        raise Exception('Could not clear users. Recieved a response of %s %s \n %s' % (response.status, response.reason, content))
{'fraction_non_alphanumeric': 0.13758389261744966, 'fraction_numerical': 0.006711409395973154, 'mean_word_length': 4.306049822064057, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '2241075', 'n_tokens_mistral': 446, 'n_tokens_neox': 424, 'n_words': 128}