~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/registry/tests/test_pillaraffiliation.py

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-06-06 02:52:27 UTC
  • mfrom: (13144.2.13 picker-click-item-detail)
  • Revision ID: launchpad@pqm.canonical.com-20110606025227-eplcb04k4ucufktz
[r=sinzui][bug=791116] Display links to a person's home page in
 launchpad when displaying search results in a person picker.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
        distro = self.factory.makeDistribution(owner=person)
21
21
        bugtask = self.factory.makeBugTask(target=distro)
22
22
        badge = IHasAffiliation(bugtask).getAffiliationBadge(person)
23
 
        self.assertEqual(badge, "distribution-badge")
 
23
        self.assertEqual(
 
24
            badge, ("/@@/distribution-badge", "Affiliated with Ubuntu"))
24
25
 
25
26
    def test_bugtask_product_affiliation(self):
26
27
        # A person who owns a bugtask product is affiliated.
28
29
        product = self.factory.makeProduct(owner=person)
29
30
        bugtask = self.factory.makeBugTask(target=product)
30
31
        badge = IHasAffiliation(bugtask).getAffiliationBadge(person)
31
 
        self.assertEqual(badge, "product-badge")
 
32
        self.assertEqual(
 
33
            badge, ("/@@/product-badge", "Affiliated with Launchpad itself"))