{%- import "generator_macros.j2" as macros with context -%}
{%- macro test_call(case) -%}
{{ case["property"] }}({{ case["input"]["bucketOne"] }},
                      {{ case["input"]["bucketTwo"] }},
                      {{ case["input"]["goal"] }},
                      "{{ case["input"]["startBucket"] }}")
{%- endmacro -%}
{{ macros.header() }}

class {{ exercise | camel_case }}Test(unittest.TestCase):
    {% for case in cases -%}
    def test_{{ case["description"] | to_snake }}(self):
        {%- if case is error_case %}
        with self.assertRaisesWithMessage(ValueError):
          {{ test_call(case) }}
        {%- else %}
        self.assertEqual({{ test_call(case) }},
            (
                {{ case["expected"]["moves"] }},
                "{{ case["expected"]["goalBucket"] }}",
                {{ case["expected"]["otherBucket"] }}
            ))
        {%- endif %}

    {% endfor %}

{{ macros.footer() }}
