~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/registry/stories/announcements/xx-announcements.txt

  • Committer: Jeroen Vermeulen
  • Date: 2011-09-26 06:30:07 UTC
  • mto: This revision was merged to the branch mainline in revision 14049.
  • Revision ID: jeroen.vermeulen@canonical.com-20110926063007-1fb5eelnidpnra9a
Fix lots of lint in recently-changed files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
    ...     """The contents of the latest news portlet."""
19
19
    ...     return extract_text(find_portlet(content, 'Announcements'))
20
20
    >>> def count_show_links(content):
21
 
    ...     """Determine whether the "Read more announcements" link is shown."""
 
21
    ...     """Is the "Read more announcements" link shown?"""
22
22
    ...     return len(find_tags_by_class(
23
23
    ...         content, 'menu-link-announcements'))
24
24
    >>> def no_announcements(content):
612
612
    Move announcement : Kubuntu announcement headline : GuadaLinex
613
613
    >>> kamion_browser.getControl('For').value = 'kubuntu'
614
614
    >>> kamion_browser.getControl('Retarget').click()
615
 
    >>> "don't have permission" in extract_text(find_main_content(kamion_browser.contents))
 
615
    >>> "don't have permission" in extract_text(
 
616
    ...     find_main_content(kamion_browser.contents))
616
617
    True
617
618
    >>> print kamion_browser.title
618
619
    Move announcement : Kubuntu announcement headline : GuadaLinex
635
636
    >>> 'NetApplet Announcements' in nopriv_browser.contents
636
637
    True
637
638
 
638
 
The "self" link should point to the original URL, in the feeds.launchpad.dev domain.
 
639
The "self" link should point to the original URL, in the feeds.launchpad.dev
 
640
domain.
639
641
 
640
642
    >>> strainer = SoupStrainer('link', rel='self')
641
643
    >>> links = parse_links(nopriv_browser.contents, rel='self')
675
677
    tag:launchpad.net,...:/+announcement/28
676
678
 
677
679
    >>> priv_browser.open('http://launchpad.dev/guadalinex/+announcements')
678
 
    >>> 'Kubuntu announcement headline' in announcements(priv_browser.contents)
 
680
    >>> "Kubuntu announcement headline" in (
 
681
    ...     announcements(priv_browser.contents))
679
682
    True
680
683
    >>> priv_browser.getLink('Kubuntu announcement headline').click()
681
684
    >>> priv_browser.getLink('Delete announcement').click()
733
736
 
734
737
It excludes retracted and future announcements too:
735
738
 
736
 
    >>> '[guadalinex] Kubuntu announcement headline' in nopriv_browser.contents
 
739
    >>> "[guadalinex] Kubuntu announcement headline" in (
 
740
    ...     nopriv_browser.contents)
737
741
    False
738
 
    >>> '[jokosher] Jokosher announcement headline' in nopriv_browser.contents
 
742
    >>> "[jokosher] Jokosher announcement headline" in nopriv_browser.contents
739
743
    False
740
744
 
741
745
The announcements are stored as plain text, but the text-to-html formatter