A few comments:
> 8 + def getLatestRelease(): > 9 + """Gets the most recent release in the series. > 10 + > 11 + Returns None if there is no release.""" > 12 +
The closing """ of a multi-line docstring should be on its own line.
> 89 + def setUp(self): > 90 + super(TestProductSeriesReleases, self).setUp() > 91 + self.product = self.factory.makeProduct() > 92 + self.productseries = self.factory.makeProductSeries( > 93 + product=self.product) > 94 + > 95 + def test_getLatestRelease(self): > 96 + # getLatestRelease returns the most recent release. > 97 + self.assertIs(None, self.productseries.getLatestRelease()) > 98 + > 99 + release = self.factory.makeProductRelease( > 100 + product=self.product, > 101 + productseries=self.productseries) > 102 + self.assertEqual(release, self.productseries.getLatestRelease()) > 103 + > 104 + second_release = self.factory.makeProductRelease( > 105 + product=self.product, > 106 + productseries=self.productseries)
We indent parameters on method calls by four spaces, e.g.:
second_release = self.factory.makeProductRelease( product=self.product, productseries=self.productseries)
« Back to merge proposal
A few comments:
> 8 + def getLatestRelease():
> 9 + """Gets the most recent release in the series.
> 10 +
> 11 + Returns None if there is no release."""
> 12 +
The closing """ of a multi-line docstring should be on its own line.
> 89 + def setUp(self): ctSeriesRelease s, self).setUp() makeProduct( ) makeProductSeri es( self.product) elease( self): ies.getLatestRe lease() ) makeProductRele ase( self.product, self.productser ies) l(release, self.productser ies.getLatestRe lease() ) makeProductRele ase( self.product, self.productser ies)
> 90 + super(TestProdu
> 91 + self.product = self.factory.
> 92 + self.productseries = self.factory.
> 93 + product=
> 94 +
> 95 + def test_getLatestR
> 96 + # getLatestRelease returns the most recent release.
> 97 + self.assertIs(None, self.productser
> 98 +
> 99 + release = self.factory.
> 100 + product=
> 101 + productseries=
> 102 + self.assertEqua
> 103 +
> 104 + second_release = self.factory.
> 105 + product=
> 106 + productseries=
We indent parameters on method calls by four spaces, e.g.:
second_release = self.factory. makeProductRele ase(
product= self.product, productseries= self.productser ies)