File: test_cz_jira.py

package info (click to toggle)
commitizen 4.9.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,672 kB
  • sloc: python: 14,530; makefile: 15
file content (39 lines) | stat: -rw-r--r-- 922 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
from commitizen.cz.jira import JiraSmartCz


def test_questions(config):
    cz = JiraSmartCz(config)
    questions = cz.questions()
    assert isinstance(questions, list)
    assert isinstance(questions[0], dict)


def test_answer(config):
    cz = JiraSmartCz(config)
    answers = {
        "message": "new test",
        "issues": "JRA-34",
        "workflow": "",
        "time": "",
        "comment": "",
    }
    message = cz.message(answers)
    assert message == "new test JRA-34"


def test_example(config):
    cz = JiraSmartCz(config)
    assert "JRA-34 #comment corrected indent issue\n" in cz.example()


def test_schema(config):
    cz = JiraSmartCz(config)
    assert "<ignored text>" in cz.schema()


def test_info(config):
    cz = JiraSmartCz(config)
    assert (
        "Smart Commits allow repository committers to perform "
        "actions such as transitioning JIRA Software"
    ) in cz.info()