# Path: test/hquery/hquery_test_util.py
# def query_html_doc(html_body, hquery, preserve_space=False, wrap_body=True):
#     soup = soup_with_body(html_body) if wrap_body else make_soup(html_body)
#     raw_result = HqueryProcessor(hquery, preserve_space=preserve_space).query(soup)
#     return eliminate_blank_lines(convert_results_to_output_text(raw_result, preserve_space=preserve_space).strip())


import json
from test.hquery.hquery_test_util import query_html_doc



def test_hash_constructor_turns_tags_into_tag_name_keys_with_tag_content_values():
    html_body = """
    <p>foo</p>
    <div>bar</div>"""

# Path: test/hquery/hquery_test_util.py
# def query_html_doc(html_body, hquery, preserve_space=False, wrap_body=True):
#     soup = soup_with_body(html_body) if wrap_body else make_soup(html_body)
#     raw_result = HqueryProcessor(hquery, preserve_space=preserve_space).query(soup)
#     return eliminate_blank_lines(convert_results_to_output_text(raw_result, preserve_space=preserve_space).strip())


# Path: test/hquery/test_computed_json_construction.py
import json
from test.hquery.hquery_test_util import query_html_doc




def test_hash_constructor_turns_tags_into_tag_name_keys_with_tag_content_values():
    html_body = """
    <p>foo</p>
    <div>bar</div>"""

    actual = json.loads(query_html_doc(html_body, 'hash { /html/body/* }'))