コード例 #1
0
class PermissionTest(unittest.TestCase):
    def setUp(self):
        self.resource = Mock()
        self.handler = Mock()
        self.perm = Permission()

    def test_has_permission(self):
        self.assertTrue(self.perm.has_permission(self.handler, self.resource))
コード例 #2
0
 def setUp(self):
     self.resource = Mock()
     self.handler = Mock()
     self.perm = Permission()