{%- import "generator_macros.j2" as macros with context -%}
{{ macros.canonical_ref() }}

{{ macros.header()}}

{% macro test_case(case) -%}
    {%- set input = case["input"] -%}
    def test_{{ case["description"] | to_snake }}(self):
        self.assertEqual(
            {{ case["property"] | to_snake }}("{{ case["input"]["phrase"] }}"),
            "{{ case["expected"] }}"
        )
{%- endmacro %}


class {{ exercise | camel_case }}Test(unittest.TestCase):
    {% for case in cases %}
    {{ test_case(case) }}
    {% endfor %}
