<commit_before>
from webob import Request
from friendsecure.lookup_server import make_app
from simplejson import dumps, loads

def test_post_invalid():
    app = make_app()
    req = Request.blank('http://localhost/12345678', method="POST")
    data = {"hello": 42}
    r = req.get_response(app)
    assert r.status_code == 400

def test_post_and_get():
    app = make_app()
    req = Request.blank('http://localhost/12345678', method="POST")
    data = dict(key="123", message="456", signature="102938")
    req.body = dumps(data)
    r = req.get_response(app)
    assert r.status_code == 200

    req = Request.blank("http://localhost/12345678", method="GET")<commit_msg>cosmetics<commit_after>
from webob import Request
from friendsecure.lookup_server import make_app
from simplejson import dumps


def test_post_invalid():
    app = make_app()
    req = Request.blank('http://localhost/12345678', method="POST")
    r = req.get_response(app)
    assert r.status_code == 400


def test_post_and_get():
    app = make_app()
    req = Request.blank('http://localhost/12345678', method="POST")
    data = dict(key="123", message="456", signature="102938")
    req.body = dumps(data)
    r = req.get_response(app)
    assert r.status_code == 200

    req = Request.blank("http://localhost/12345678", method="GET")
{'fraction_non_alphanumeric': 0.14253048780487804, 'fraction_numerical': 0.06554878048780488, 'mean_word_length': 4.169291338582677, 'pattern_counts': {'":': 1, '<': 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': '6325890', 'n_tokens_mistral': 484, 'n_tokens_neox': 414, 'n_words': 95}