"""Generated tests for {{ directive_name }} directive."""
from __future__ import annotations


class TestDirective:
    """Tests for the ``.. {{ directive_name }}::`` directive."""

    def test_directive_class_exists(self):
        from {{ import_name }}._generated.directive import {{ directive_class }}
        assert {{ directive_class }}.node_class is not None

    def test_node_class_exists(self):
        from {{ import_name }}._generated.directive import {{ node_class }}
        assert {{ node_class }} is not None
{% for opt in options %}

    def test_option_{{ opt.test_name }}(self):
        from {{ import_name }}._generated.directive import {{ directive_class }}
        assert '{{ opt.name }}' in {{ directive_class }}.option_spec
{% endfor %}
