Ubuntu Pastebin

Paste from wgrant at Thu, 17 Dec 2015 01:02:47 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
=== modified file 'lib/lp/registry/browser/tests/test_product.py'
--- lib/lp/registry/browser/tests/test_product.py	2015-10-01 17:32:41 +0000
+++ lib/lp/registry/browser/tests/test_product.py	2015-12-17 01:01:43 +0000
@@ -748,6 +748,14 @@
             view.render()
             self.assertThat(recorder, HasQueryCount(LessThan(26)))
 
+    def test_reset_oddity(self):
+        from lp.registry.model.milestone import Milestone
+        product = Product.get(1)
+        series = product.development_focus
+        Milestone(product=product, productseries=series, name=u'foo')
+        removeSecurityProxy(product).access_policies = [1]
+        IStore(Product).reset()
+
 
 class TestProductRdfView(BrowserTestCase):
     """Test the Product RDF view."""

=== modified file 'lib/lp/registry/model/product.py'
--- lib/lp/registry/model/product.py	2015-10-01 17:32:41 +0000
+++ lib/lp/registry/model/product.py	2015-12-17 00:37:36 +0000
@@ -47,6 +47,7 @@
     Store,
     Unicode,
     )
+from storm.properties import Int, List
 from zope.component import getUtility
 from zope.event import notify
 from zope.interface import (
@@ -435,6 +436,8 @@
         name='remote_product', allow_none=True, default=None)
     vcs = EnumCol(enum=VCSType, notNull=False)
 
+    access_policies = List(type=Int())
+
     @property
     def displayname(self):
         return self.display_name
Download as text