Пример #1
0
    def test_requires_owner_w_child_org_and_parent_owner(self):
        """Parent owners are as child owners."""
        baby_org = Organization.objects.create(name='baby')
        baby_org.parent_org = self.fake_org
        baby_org.save()

        self.assertTrue(decorators.requires_owner(self.owner_org_user))
Пример #2
0
 def test_requires_owner(self):
     """Test ownerness."""
     self.assertTrue(decorators.requires_owner(self.owner_org_user))
     self.assertFalse(decorators.requires_owner(self.member_org_user))
     self.assertFalse(decorators.requires_owner(self.viewer_org_user))