コード例 #1
0
ファイル: project_test.py プロジェクト: MattyO/trackerCharts
    def test_cant_find_project(self):
        project_list = [
                Project({"id": "111111", "public": "true", "name":"Test Project 1"}),
                Project({"id": "222222", "public": "false", "name":"Test Project 2"}),
                Project({"id": "666666", "public": "false", "name":"Test Project 3"})]

        project_found = find_project(project_list,'999999')

        self.assertEqual(project_found, None)
コード例 #2
0
ファイル: app.py プロジェクト: MattyO/trackerCharts
def project(project_id):
    current_user = flask_helper.safe_session("user_id")

    project_list = _get_filtered_projects()
    project_found = find_project(project_list, str(project_id))

    if project_found == None:
        return redirect(url_for("overview"))

    project_id = str(project_id)
    burndown = Burndown(project_id, localdata.getBurndownStates(project_id))
    labels = burndown_labels(burndown)
    possible_states = config.states("tracker")

    return render_template("project.html", project=project_found, labels=labels, states=possible_states)