Beispiel #1
0
    def test_add_project_names(self):
        story = Story({
            "name":"Some Thigns",
            "project_id":"111111",
            "id":"2222222",
            "updated_at":"2012/09/20 14:10:53 UTC"})
        story_list = [story]

        project_list = [
                Project({"id":"111111", "name":"Test Project"})]

        new_story_list = add_project_names(story_list, project_list)

        self.assertEqual(new_story_list[0].project_name, "Test Project")
Beispiel #2
0
def overview():
    current_user = flask_helper.safe_session("user_id")
    projects = _get_filtered_projects()
    possible_states = config.states("tracker")

    project_ids = list_ids(projects)
    stories = _stories_for(project_ids)

    in_progress_ids = ids_for_in_progress(stories)

    stories = keep_by_ids(stories, in_progress_ids)
    stories = prettify_stories(stories)
    stories = add_project_names(stories, projects)

    return render_template("index.html", projects=projects, user=current_user, states=possible_states, stories=stories)