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

from .suites.default_ext import app

def test_query():
    assert app.client.get('/query?hello=world').data == b'world'

def test_form():
    assert app.client.post('/form', data={'hello': 'world'}).data == b'world'

def test_json():
    assert app.client.post('/json', data='{"hello":"world"}',
            headers={'Content-Type': 'application/json'}).data == b'world'

def test_headers():
    assert app.client.get('/headers', headers={'hello': 'world'}).data == b'world'

def test_method_get():
    assert app.client.get('/method').data == b'GET'

def test_method_post():
    assert app.client.post('/method').data == b'POST'

def test_method_put():
    assert app.client.put('/method').data == b'PUT'

def test_method_delete():
    assert app.client.delete('/method').data == b'DELETE'

# TODO: we need to support head/options/patch<commit_msg>Test body.<commit_after># -*- coding: utf-8 -*-

from .suites.default_ext import app

def test_query():
    assert app.client.get('/query?hello=world').data == b'world'

def test_form():
    assert app.client.post('/form', data={'hello': 'world'}).data == b'world'

def test_json():
    assert app.client.post('/json', data='{"hello":"world"}',
            headers={'Content-Type': 'application/json'}).data == b'world'

def test_headers():
    assert app.client.get('/headers', headers={'hello': 'world'}).data == b'world'

def test_method_get():
    assert app.client.get('/method').data == b'GET'

def test_method_post():
    assert app.client.post('/method').data == b'POST'

def test_method_put():
    assert app.client.put('/method').data == b'PUT'

def test_method_delete():
    assert app.client.delete('/method').data == b'DELETE'

# TODO: we need to support head/options/patch

def test_body():
    assert app.client.post('/body', data='Whatever').data == 'Whatever'
{'fraction_non_alphanumeric': 0.2037533512064343, 'fraction_numerical': 0.0010723860589812334, 'mean_word_length': 4.286118980169972, 'pattern_counts': {'":': 2, '<': 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': '6057647', 'n_tokens_mistral': 599, 'n_tokens_neox': 602, 'n_words': 126}