~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/blueprints/browser/tests/test_specification.py

  • Committer: Curtis Hovey
  • Date: 2011-09-06 12:13:13 UTC
  • mfrom: (13883 devel)
  • mto: This revision was merged to the branch mainline in revision 13884.
  • Revision ID: curtis.hovey@canonical.com-20110906121313-2r9ep4ird8jw4nrl
Merged devel.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright 2009-2010 Canonical Ltd.  This software is licensed under the
 
1
# Copyright 2009-2011 Canonical Ltd.  This software is licensed under the
2
2
# GNU Affero General Public License version 3 (see the file LICENSE).
3
3
 
4
4
__metaclass__ = type
17
17
from zope.publisher.interfaces import NotFound
18
18
from zope.security.proxy import removeSecurityProxy
19
19
 
20
 
from canonical.launchpad.webapp.interfaces import BrowserNotificationLevel
21
 
from canonical.launchpad.webapp.servers import StepsToGo
22
20
from canonical.launchpad.testing.pages import (
23
21
    extract_text,
24
22
    find_tag_by_id,
25
23
    )
 
24
from canonical.launchpad.webapp.interfaces import BrowserNotificationLevel
 
25
from canonical.launchpad.webapp.servers import StepsToGo
26
26
from canonical.testing.layers import DatabaseFunctionalLayer
27
27
from lp.app.browser.tales import format_link
28
28
from lp.blueprints.browser import specification
38
38
    )
39
39
from lp.testing.views import create_initialized_view
40
40
 
 
41
 
41
42
class TestSpecificationSearch(TestCaseWithFactory):
42
43
 
43
44
    layer = DatabaseFunctionalLayer
167
168
            owner=self.factory.makePerson(displayname="Some Person"))
168
169
        html = create_initialized_view(
169
170
                spec, '+index')()
170
 
        self.assertThat(extract_text(html), DocTestMatches(extract_text(
171
 
            "... Registered by Some Person a moment ago ..."), doctest.ELLIPSIS
172
 
            | doctest.NORMALIZE_WHITESPACE | doctest.REPORT_NDIFF))
 
171
        self.assertThat(
 
172
            extract_text(html), DocTestMatches(
 
173
                extract_text(
 
174
                    "... Registered by Some Person a moment ago ..."),
 
175
                (
 
176
                    doctest.ELLIPSIS |
 
177
                    doctest.NORMALIZE_WHITESPACE |
 
178
                    doctest.REPORT_NDIFF)))
 
179
 
173
180
 
174
181
class TestSpecificationEditStatusView(TestCaseWithFactory):
175
182
    """Test the SpecificationEditStatusView."""