101
101
# The owner (maintainer) of the product gets to set Blocked as well.
102
102
owner = self.productseries.product.owner
103
103
self._assertCanSetStatus(owner, self.entry,
105
[False, True, True, False, False, False, True])
105
[True, True, True, False, False, True, True])
107
107
def test_canSetStatus_owner_and_uploader(self):
108
108
# Corner case: Nothing changes if the maintainer is also the uploader.
109
109
self.productseries.product.owner = self.uploaderperson
110
110
self._assertCanSetStatus(self.uploaderperson, self.entry,
112
[False, True, True, False, False, False, True])
112
[True, True, True, False, False, True, True])
114
114
def test_canSetStatus_driver(self):
115
115
# The driver gets the same permissions as the maintainer.
116
116
driver = self.productseries.driver
117
117
self._assertCanSetStatus(driver, self.entry,
119
[False, True, True, False, False, False, True])
119
[True, True, True, False, False, True, True])
121
121
def test_canSetStatus_driver_and_uploader(self):
122
122
# Corner case: Nothing changes if the driver is also the uploader.
123
123
self.productseries.driver = self.uploaderperson
124
124
self._assertCanSetStatus(self.uploaderperson, self.entry,
126
[False, True, True, False, False, False, True])
126
[True, True, True, False, False, True, True])
128
128
def test_canSetStatus_product_driver(self):
129
129
# The driver of the product, too.
130
130
driver = self.productseries.product.driver
131
131
self._assertCanSetStatus(driver, self.entry,
133
[False, True, True, False, False, False, True])
133
[True, True, True, False, False, True, True])
135
135
def test_canSetStatus_product_driver_and_uploader(self):
136
136
# Corner case: Nothing changes if the driver is also the uploader.
137
137
self.productseries.product.driver = self.uploaderperson
138
138
self._assertCanSetStatus(self.uploaderperson, self.entry,
140
[False, True, True, False, False, False, True])
140
[True, True, True, False, False, True, True])
142
142
def _setUpUbuntu(self):
143
143
self.ubuntu = getUtility(ILaunchpadCelebrities).ubuntu