Пример #1
0
def test_changelog_v1_get_title():
    kwargs = {
        "default_title": "test_default",
        "kinds": {
            "add": {
                "labels": ["add", "added"],
                "title": "Added",
                "version": "minor",
            },
        },
    }
    changelog_config = ChangelogConfigFactory().create(1, **kwargs)
    assert changelog_config.get_title("add") == "Added"
Пример #2
0
def test_changelog_v1():
    kwargs = {
        "folder": "test_folder",
        "start": "test_start",
        "end": "test_end",
        "default_title": "test_default",
        "kinds": {
            "add": {
                "labels": ["add", "added"],
                "title": "Added",
                "version": "minor",
            },
        },
    }
    changelog_config = ChangelogConfigFactory().create(1, **kwargs)
    assert changelog_config.folder == "test_folder"
    assert changelog_config.start == "test_start"
    assert changelog_config.end == "test_end"
    assert changelog_config.default_title == "test_default"
    assert changelog_config.kinds == {
        "add": {
            "labels": ["add", "added"],
            "title": "Added",
            "version": "minor",
        },
    }
Пример #3
0
def test_changelog_v1_with_default():
    changelog_config = ChangelogConfigFactory().create(1)
    assert changelog_config.folder == "changelogs"
    assert changelog_config.start == "master"
    assert changelog_config.end == "HEAD"
    assert changelog_config.default_title == "Uncategorized"
    assert changelog_config.kinds == {}
Пример #4
0
def test_changelog_factory_create_v1():
    changelog_config = ChangelogConfigFactory().create(1)
    assert isinstance(changelog_config, ChangelogConfigV1)