~launchpad-pqm/launchpad/devel

« back to all changes in this revision

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

Merge db-devel.

Show diffs side-by-side

added added

removed removed

Lines of Context:
209
209
                processorfamily.processors[0]))
210
210
 
211
211
    def test_getDerivedSeries(self):
212
 
        distroseries = self.factory.makeDistroSeries(
213
 
            previous_series=self.factory.makeDistroSeries())
214
 
        self.assertContentEqual(
215
 
            [distroseries], distroseries.previous_series.getDerivedSeries())
 
212
        dsp = self.factory.makeDistroSeriesParent()
 
213
        self.assertEquals(
 
214
            [dsp.derived_series], dsp.parent_series.getDerivedSeries())
216
215
 
217
216
    def test_registrant_owner_differ(self):
218
217
        # The registrant is the creator whereas the owner is the
223
222
        self.assertEquals(registrant, distroseries.registrant)
224
223
        self.assertNotEqual(distroseries.registrant, distroseries.owner)
225
224
 
226
 
    def test_is_derived(self):
227
 
        # The series is a derived series if it has a previous_series set.
228
 
        derived_distroseries = self.factory.makeDistroRelease(
229
 
            previous_series=self.factory.makeDistroRelease())
230
 
        distroseries = self.factory.makeDistroRelease()
231
 
        self.assertFalse(distroseries.is_derived_series)
232
 
        self.assertTrue(derived_distroseries.is_derived_series)
233
 
 
234
225
    def test_is_initialising(self):
235
226
        # The series is_initialising only if there is an initialisation
236
227
        # job with a pending status attached to this series.