Commit de437360 authored by Romain Courteaud's avatar Romain Courteaud

slapos_slap_tool: product/release

parent 3ab3a576
......@@ -2297,14 +2297,14 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSSlapToolMixin):
def test_getSoftwareReleaseListFromSoftwareProduct(self):
new_id = self.generateNewId()
software_product = self._makeSoftwareProduct(new_id)
software_product = self._makeSoftwareProduct(self.project, new_id=new_id)
# 2 published software releases
software_release1 = self._makeSoftwareRelease(new_id)
software_release2 = self._makeSoftwareRelease(self.generateNewId())
software_release1 = self._makeSoftwareRelease(software_product)
software_release2 = self._makeSoftwareRelease(software_product)
software_release1.publish()
software_release2.publish()
# 1 released software release, should not appear
software_release3 = self._makeSoftwareRelease(new_id)
software_release3 = self._makeSoftwareRelease(software_product)
self.assertTrue(software_release3.getValidationState() == 'released')
software_release1.edit(
aggregate_value=software_product.getRelativeUrl(),
......@@ -2340,11 +2340,11 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSSlapToolMixin):
def test_getSoftwareReleaseListFromSoftwareProduct_effectiveDate(self):
new_id = self.generateNewId()
software_product = self._makeSoftwareProduct(new_id)
software_product = self._makeSoftwareProduct(self.project, new_id=new_id)
# 3 published software releases
software_release1 = self._makeSoftwareRelease(new_id)
software_release2 = self._makeSoftwareRelease(self.generateNewId())
software_release3 = self._makeSoftwareRelease(self.generateNewId())
software_release1 = self._makeSoftwareRelease(software_product)
software_release2 = self._makeSoftwareRelease(software_product)
software_release3 = self._makeSoftwareRelease(software_product)
software_release1.publish()
software_release2.publish()
software_release3.publish()
......@@ -2387,7 +2387,7 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSSlapToolMixin):
def test_getSoftwareReleaseListFromSoftwareProduct_emptySoftwareProduct(self):
new_id = self.generateNewId()
software_product = self._makeSoftwareProduct(new_id)
software_product = self._makeSoftwareProduct(self.project, new_id=new_id)
response = self.portal_slap.getSoftwareReleaseListFromSoftwareProduct(
software_product.getReference())
......@@ -2418,14 +2418,14 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSSlapToolMixin):
def test_getSoftwareReleaseListFromSoftwareProduct_fromUrl(self):
new_id = self.generateNewId()
software_product = self._makeSoftwareProduct(new_id)
software_product = self._makeSoftwareProduct(self.project, new_id=new_id)
# 2 published software releases
software_release1 = self._makeSoftwareRelease(new_id)
software_release2 = self._makeSoftwareRelease(self.generateNewId())
software_release1 = self._makeSoftwareRelease(software_product)
software_release2 = self._makeSoftwareRelease(software_product)
software_release1.publish()
software_release2.publish()
# 1 released software release, should not appear
software_release3 = self._makeSoftwareRelease(new_id)
software_release3 = self._makeSoftwareRelease(software_product)
self.assertTrue(software_release3.getValidationState() == 'released')
software_release1.edit(
aggregate_value=software_product.getRelativeUrl(),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment