Exemplo n.º 1
0
def test_format_expressions(
    query: ClickhouseQuery,
    profile: ClickhouseQueryProfile,
) -> None:
    generated_profile = generate_profile(query)
    assert generated_profile == profile
    # Ensure that json serialization does not fail.
    safe_dumps(generated_profile.to_dict())
Exemplo n.º 2
0
def test_safe_dumps():
    assert safe_dumps(
        ChainMap({"a": 1}, {"b": 2}),
        sort_keys=True,
    ) == safe_dumps(
        {
            "a": 1,
            "b": 2
        },
        sort_keys=True,
    )
Exemplo n.º 3
0
def test_safe_dumps():
    assert safe_dumps(
        ChainMap({'a': 1}, {'b': 2}),
        sort_keys=True,
    ) == safe_dumps(
        {
            'a': 1,
            'b': 2
        },
        sort_keys=True,
    )