Exemplo n.º 1
0
def test_addTagsToTagList():
    task = entities.Task()
    for r in range(5):
        t = entities.Tag()
        task.addTag(t)

    assert len(task.tags) == 5
    assert isinstance(task.tags, List)
    assert isinstance(task.tags[0], entities.Tag)
def test_add_tasks_to_task_list():
    s = entities.UserStory()
    for r in range(5):
        t = entities.Task()
        s.add_task(t)

    assert len(s.tasks) == 5
    assert isinstance(s.tasks, List)
    assert isinstance(s.tasks[0], entities.Task)
Exemplo n.º 3
0
def test_addGenericsToTagList():
    task = entities.Task()
    with pytest.raises(TypeError) as exc:
        for r in range(5):
            task.addTag(r)
    assert "value must be of type 'Tag'" in str(exc.value)
Exemplo n.º 4
0
def test_initEpic():
    task = entities.Task()
    assert isinstance(task, entities.Task)
    assert isinstance(task.tags, List)
    assert len(task.tags) == 0
Exemplo n.º 5
0
def test_setDescriptionToNumber():
    task = entities.Task()

    with pytest.raises(TypeError) as exc:
        task.description = 42
    assert "value must be a string" in str(exc.value)
Exemplo n.º 6
0
def test_setDescriptionToString():
    task = entities.Task()
    task.description = "Test"
    assert task.description == "Test"
Exemplo n.º 7
0
def test_setTitleToNumber():
    task = entities.Task()

    with pytest.raises(TypeError) as exc:
        task.title = 42
    assert "value must be a string" in str(exc.value)
Exemplo n.º 8
0
def test_setTitleToString():
    task = entities.Task()
    task.title = "Test"
    assert task.title == "Test"
    def mock_backlog_build_task_returns_task(*args, **kwargs):
        task = entities.Task()
        task.title = "Some Task"
        task.description = "Some Description"

        return task
Exemplo n.º 10
0
def test_set_description_to_string():
    task = entities.Task()
    task.description = "Test"
    assert task.description == "Test"
Exemplo n.º 11
0
def test_set_title_to_string():
    task = entities.Task()
    task.title = "Test"
    assert task.title == "Test"
Exemplo n.º 12
0
    def mockBacklogBuildTaskReturnTask(*args, **kwargs):
        task = entities.Task()
        task.title = "Some Task"
        task.description = "Some Description"

        return task