launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #01423
[Merge] lp:~stevenk/launchpad/db-fix-disabled-dases-test into lp:launchpad
Steve Kowalik has proposed merging lp:~stevenk/launchpad/db-fix-disabled-dases-test into lp:launchpad.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
This branch fixes the test_do_not_copy_disabled_dases test to no longer rely on helper functions that got ripped out when the sampledata was removed.
--
https://code.launchpad.net/~stevenk/launchpad/db-fix-disabled-dases-test/+merge/37819
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~stevenk/launchpad/db-fix-disabled-dases-test into lp:launchpad.
=== modified file 'lib/lp/soyuz/scripts/tests/test_initialise_distroseries.py'
--- lib/lp/soyuz/scripts/tests/test_initialise_distroseries.py 2010-10-06 20:34:27 +0000
+++ lib/lp/soyuz/scripts/tests/test_initialise_distroseries.py 2010-10-07 05:38:42 +0000
@@ -244,24 +244,15 @@
def test_do_not_copy_disabled_dases(self):
# DASes that are disabled in the parent will not be copied
- i386 = self.factory.makeProcessorFamily()
- ppc = self.factory.makeProcessorFamily()
- parent = self.factory.makeDistroSeries()
- i386_das = self.factory.makeDistroArchSeries(
- distroseries=parent, processorfamily=i386)
ppc_das = self.factory.makeDistroArchSeries(
- distroseries=parent, processorfamily=ppc)
+ distroseries=self.parent)
ppc_das.enabled = False
- parent.nominatedarchindep = i386_das
- foobuntu = self._create_distroseries(parent)
- ids = InitialiseDistroSeries(foobuntu)
- ids.check()
- ids.initialise()
+ child = self._full_initialise()
das = list(IStore(DistroArchSeries).find(
- DistroArchSeries, distroseries = foobuntu))
+ DistroArchSeries, distroseries = child))
self.assertEqual(len(das), 1)
self.assertEqual(
- das[0].architecturetag, i386_das.architecturetag)
+ das[0].architecturetag, self.parent_das.architecturetag)
def test_script(self):
# Do an end-to-end test using the command-line tool
Follow ups