示例#1
0
 def test_item(self):
     acl = self.dummy_acl()
     item = acl(request="foo")["item-id"]
     assert item.id == "item-id"
     assert isinstance(item, acl.item_model)
示例#2
0
 def test_inherit_acl(self):
     acl = self.dummy_acl()
     item = acl(request="foo")["name"]
     assert getattr(item, "__acl__", None) == None
示例#3
0
 def test_default_acl(self):
     acl = self.dummy_acl()
     obj = acl(request="foo")
     assert obj.__acl__ == (("Allow", "g:admin", ALL_PERMISSIONS),)
示例#4
0
 def test_item(self):
     acl = self.dummy_acl()
     item = acl(request='foo')['item-id']
     assert item.id == 'item-id'
     assert isinstance(item, acl.item_model)
示例#5
0
 def test_inherit_acl(self):
     acl = self.dummy_acl()
     item = acl(request='foo')['name']
     assert getattr(item, '__acl__', None) == None
示例#6
0
 def test_default_acl(self):
     acl = self.dummy_acl()
     obj = acl(request='foo')
     assert obj.__acl__ == (('Allow', 'g:admin', ALL_PERMISSIONS),)