~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/registry/doc/sourcepackage.txt

MergeĀ fromĀ trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
131
131
    >>> from lp.soyuz.model.component import Component
132
132
    >>> from lp.soyuz.model.publishing import (
133
133
    ...     SourcePackagePublishingHistory)
134
 
    >>> from canonical.launchpad.ftests import syncUpdate
135
134
 
136
135
    >>> latest_publishing = SourcePackagePublishingHistory.get(
137
136
    ...     publishing_history[-1].id)
138
137
    >>> universe = Component.byName('universe')
139
138
    >>> latest_publishing.component = universe
140
 
    >>> syncUpdate(latest_publishing)
141
139
    >>> flush_database_caches()
142
140
 
143
141
    >>> for release in firefox_warty.distinctreleases:
153
151
    >>> from lp.soyuz.enums import PackagePublishingStatus
154
152
 
155
153
    >>> latest_publishing.status = PackagePublishingStatus.SUPERSEDED
156
 
    >>> syncUpdate(latest_publishing)
157
154
    >>> print firefox_warty.latest_published_component
158
155
    None
159
156
 
191
188
 
192
189
    >>> from datetime import timedelta
193
190
    >>> pub.dateremoved = pub.datesuperseded + timedelta(days=1)
194
 
    >>> syncUpdate(pub)
195
191
 
196
192
    >>> for release in pmount_hoary.releases:
197
193
    ...     print release.title, release.publishing_history[0].status.name