def test_init_UserStory():
    s = entities.UserStory()
    assert isinstance(s, entities.UserStory)
    assert isinstance(s.tasks, List)
    assert len(s.tasks) == 0
    assert isinstance(s.tags, List)
    assert len(s.tags) == 0
def test_addStoriesToUserStoryList():
    f = entities.Feature()
    for r in range(5):
        s = entities.UserStory()
        f.addUserStory(s)

    assert len(f.userStories) == 5
    assert isinstance(f.userStories, List)
    assert isinstance(f.userStories[0], entities.UserStory)
def test_add_tags_to_tag_list():
    s = entities.UserStory()
    for r in range(5):
        t = entities.Tag()
        s.add_tag(t)

    assert len(s.tags) == 5
    assert isinstance(s.tags, List)
    assert isinstance(s.tags[0], entities.Tag)
Example #4
0
def test_addTasksToTaskList():
    s = entities.UserStory()
    for r in range(5):
        t = entities.Task()
        s.addTask(t)

    assert len(s.tasks) == 5
    assert isinstance(s.tasks, List)
    assert isinstance(s.tasks[0], entities.Task)
    def mock_backlog_build_story_returns_story(*args, **kwargs):
        story = entities.UserStory()
        story.title = "Some Story"
        story.description = "Some Description"

        return story
Example #6
0
    def mockBacklogBuildStoryReturnStory(*args, **kwargs):
        story = entities.UserStory()
        story.title = "Some Story"
        story.description = "Some Description"

        return story
def test_add_generics_to_tag_list():
    s = entities.UserStory()
    with pytest.raises(TypeError) as exc:
        for r in range(5):
            s.add_tag(r)
    assert "value must be of type 'Tag'" in str(exc.value)
def test_set_description_to_number():
    s = entities.UserStory()

    with pytest.raises(TypeError) as exc:
        s.description = 42
    assert "value must be a string" in str(exc.value)
def test_set_description_to_string():
    s = entities.UserStory()
    s.description = "Test"
    assert s.description == "Test"
def test_set_title_to_string():
    s = entities.UserStory()
    s.title = "Test"
    assert s.title == "Test"
Example #11
0
def test_addGenericsToFeatureList():
    s = entities.UserStory()
    with pytest.raises(TypeError) as exc:
        for r in range(5):
            s.addTask(r)
    assert "value must be of type 'Task'" in str(exc.value)
Example #12
0
def test_setDescriptionToString():
    s = entities.UserStory()
    s.description = "Test"
    assert s.description == "Test"
Example #13
0
def test_setTitleToNumber():
    s = entities.UserStory()

    with pytest.raises(TypeError) as exc:
        s.title = 42
    assert "value must be a string" in str(exc.value)
Example #14
0
def test_setTitleToString():
    s = entities.UserStory()
    s.title = "Test"
    assert s.title == "Test"