<commit_before>from config import config
import string
import random
import requests
import json


def random_string():
    return ''.join(random.choice(string.lowercase) for x in range(10))


def logout(browser):
    browser.visit('{0}{1}'.format(config['DM_FRONTEND_URL'], '/logout'))


def login(browser, email, password):
    logout(browser)
    browser.visit('{0}{1}'.format(config['DM_FRONTEND_URL'], '/login'))
    browser.fill('email_address', email)
    browser.fill('password', password)
    click_button('Log in', browser)


def click_button(text, browser):
    button = browser.find_by_value(text).first
    button.click()


def save_and_continue(browser):
    click_button('Save and continue', browser)


def click_link(link_text, browser):
    browser.click_link_by_text(link_text)
<commit_msg>fix integration tests due to accept terms<commit_after>from config import config
import string
import random
import requests
import json


def random_string():
    return ''.join(random.choice(string.lowercase) for x in range(10))


def logout(browser):
    browser.visit('{0}{1}'.format(config['DM_FRONTEND_URL'], '/logout'))


def login(browser, email, password):
    logout(browser)
    browser.visit('{0}{1}'.format(config['DM_FRONTEND_URL'], '/login'))
    browser.fill('email_address', email)
    browser.fill('password', password)
    click_button('Log in', browser)
    if browser.title.startswith('Terms of Use Updated'):
        accept_checkbox = browser.find_by_xpath("//label[text()='I accept the updated Terms of Use']").first
        accept_checkbox.click()
        click_button('Accept', browser)


def click_button(text, browser):
    button = browser.find_by_value(text).first
    button.click()


def save_and_continue(browser):
    click_button('Save and continue', browser)


def click_link(link_text, browser):
    browser.click_link_by_text(link_text)

{'fraction_non_alphanumeric': 0.13443145589798086, 'fraction_numerical': 0.006376195536663124, 'mean_word_length': 5.054662379421222, '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': '3802552', 'n_tokens_mistral': 593, 'n_tokens_neox': 578, 'n_words': 130}