~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/registry/browser/tests/test_distroseries.py

  • Committer: Steve Kowalik
  • Date: 2011-11-10 04:20:32 UTC
  • mto: This revision was merged to the branch mainline in revision 14278.
  • Revision ID: stevenk@ubuntu.com-20111110042032-no3ezrdfzh4uckhc
Make use of login_celebrity instead.

Show diffs side-by-side

added added

removed removed

Lines of Context:
73
73
    DistroSeriesDifferenceType,
74
74
    )
75
75
from lp.registry.interfaces.distribution import IDistributionSet
76
 
from lp.registry.interfaces.person import IPersonSet
77
76
from lp.registry.interfaces.pocket import PackagePublishingPocket
78
77
from lp.registry.interfaces.series import SeriesStatus
79
78
from lp.services.features import (
121
120
    EqualsIgnoringWhitespace,
122
121
    HasQueryCount,
123
122
    )
124
 
from lp.testing.sampledata import ADMIN_EMAIL
125
123
from lp.testing.views import create_initialized_view
126
124
 
127
125
 
2731
2729
        # set when the +edit view is used.
2732
2730
        ubuntu = getUtility(IDistributionSet).getByName('ubuntu')
2733
2731
        distroseries = self.factory.makeDistroSeries(distribution=ubuntu)
2734
 
        admin = getUtility(IPersonSet).getByEmail(ADMIN_EMAIL)
2735
2732
        form = {
2736
2733
            'field.actions.change': 'Change',
2737
2734
            'field.status': 'CURRENT'
2738
2735
            }
2739
 
        with person_logged_in(admin):
2740
 
            create_initialized_view(
2741
 
                distroseries, name='+edit', principal=admin, form=form)
 
2736
        admin = login_celebrity('admin')
 
2737
        create_initialized_view(
 
2738
            distroseries, name='+edit', principal=admin, form=form)
2742
2739
        self.assertIsNot(None, distroseries.datereleased)