~bigkevmcd/offspring/bug-1039135-fix-notifications

« back to all changes in this revision

Viewing changes to lib/offspring/web/queuemanager/tests/test_templatetags.py

Fixed several critical regressions [r=timrc].

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Copyright 2012 Canonical Ltd.  This software is licensed under the
 
2
# GNU Affero General Public License version 3 (see the file LICENSE).
 
3
 
 
4
from django.test import TestCase
 
5
 
 
6
from offspring.config import get_configuration
 
7
from offspring.web.queuemanager.templatetags.lexbuilder_helpers import (
 
8
    link_results,
 
9
)
 
10
 
 
11
config = get_configuration()
 
12
 
 
13
class LexbuilderHelpersTemplateTagTests(TestCase):
 
14
 
 
15
    def test_link_results(self):
 
16
        base_uri = config.get("web", "build_results_uri")
 
17
        project_name = "foobar"
 
18
        build_date = "201202"
 
19
        build_id = "0"
 
20
        expected_link = "%s/%s/%s/%s" % (
 
21
            base_uri, project_name, build_date, build_id)
 
22
        self.assertEqual(
 
23
            link_results(project_name, "%s-%s" % (build_date, build_id)),
 
24
            expected_link)
 
25
 
 
26