plone / bobtemplates.plone

Python Code Templates for Plone Projects with mr.bob
https://pypi.org/project/bobtemplates.plone/
GNU General Public License v2.0
24 stars 31 forks source link

Refacture tests to not have so many manuel settings #501

Open MrTango opened 2 years ago

MrTango commented 2 years ago

many tests use a Configurator object with manuel settings:

    configurator = Configurator(
        template="bobtemplates.plone:view",
        target_directory="collective.sample",
        bobconfig={"non_interactive": True},
        variables={
            "view_python_class": True,
            "view_python_class_name": "MyView",
            "view_python_file_name": "py_view",
            "view_register_for": "Folder",
            "view_name": "py-view",
            "view_template": True,
            "view_template_name": "pt_view",
            "package_folder": package_path,
            "package.dottedname": "collective.sample",
            "package.browserlayer": "CollectiveSampleLayer",
        },
    )

it would be better to either have the base settings defined once or use a mrbob.ini to load them in most tests.