How to use the betelgeuse.default_config.TESTCASE_CUSTOM_FIELDS function in Betelgeuse

To help you get started, we’ve selected a few Betelgeuse examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github SatelliteQE / betelgeuse / tests / test_betelgeuse.py View on Github external
def test_create_xml_testcase():
    """Check if create_xml_testcase creates the expected XML tag."""
    testcase = mock.MagicMock()
    testcase.name = 'test_it_works'
    testcase.parent_class = 'FeatureTestCase'
    testcase.testmodule = 'tests/test_feature.py'
    testcase.docstring = 'Test feature docstring'
    testcase.fields = {
        field: field for field in
        default_config.TESTCASE_FIELDS + default_config.TESTCASE_CUSTOM_FIELDS
    }
    testcase.fields['parametrized'] = 'yes'
    config = BetelgeuseConfig()
    generated = ElementTree.tostring(
        create_xml_testcase(config, testcase, '{path}#{line_number}'),
        encoding='unicode'
    )
    assert generated == (
        '