<commit_before>import ssl
import functools
from ..testenv import badssl, local as _local


def https_callback(conn, certfile, keyfile):
    s = ssl.wrap_socket(conn, server_side=True, certfile=certfile, keyfile=keyfile)
    s.sendall(b"HTTP/1.0 200 OK\r\nContent-Length: 0\r\n\r\n")


local = functools.partial(_local, callback=https_callback)


badssl_tests = [
    badssl(True, "sha1-2016"),
    badssl(False, "expired")
]


local_tests = [
    local(True, "localhost"),<commit_msg>Added tests to (correct?) location<commit_after>import ssl
import functools
from ..testenv import badssl, local as _local


def https_callback(conn, certfile, keyfile):
    s = ssl.wrap_socket(conn, server_side=True, certfile=certfile, keyfile=keyfile)
    s.sendall(b"HTTP/1.0 200 OK\r\nContent-Length: 0\r\n\r\n")


local = functools.partial(_local, callback=https_callback)


badssl_tests = [    
    badssl(False, "expired"), # not with an obsolete cert
    badssl(False, "wrong.host"), # not with a wrong name
    badssl(False, "self-signed"), # not just one's own claims
    badssl(True, "sha256"), # future proof sha
    badssl(True, "1000-sans"), # massive alternative names
    badssl(True, "10000-sans"), # massive alternative names
    badssl(False, "incomplete-chain"), # should have full proof of chain to trusted CA
    badssl(False, "pinning-test"), # why???
    badssl(False, "superfish"), # super fishy CA
    badssl(False, "edellroot"), # rotten roots CA
    badssl(False, "dsdtestprovider") # unproviding CA
  ]


local_tests = [
    local(True, "localhost"),
{'fraction_non_alphanumeric': 0.13252240717029448, 'fraction_numerical': 0.01856594110115237, 'mean_word_length': 4.371134020618556, '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': '1047712', 'n_tokens_mistral': 564, 'n_tokens_neox': 530, 'n_words': 133}