Пример #1
0
    def test_get_template_description(self, cfngin_context):
        """Test for get_template_description."""
        hook = Hook(cfngin_context, MagicMock())

        result = hook.get_template_description()

        assert result == 'Automatically generated by {}'.format(
            hook.__class__.__module__)
        assert hook.get_template_description('suffix').endswith(' - suffix')
Пример #2
0
    def test_get_template_description(
            self, cfngin_context: MockCFNginContext) -> None:
        """Test for get_template_description."""
        hook = Hook(cfngin_context, MagicMock())

        result = hook.get_template_description()

        assert result == "Automatically generated by {}".format(
            hook.__class__.__module__)
        assert hook.get_template_description("suffix").endswith(" - suffix")