コード例 #1
0
ファイル: nipap-ro.py プロジェクト: scoffers/NIPAPP
 def test_edit_pool(self):
     """ We should NOT be able to execute edit_pool as read-only user
     """
     p = Pool()
     p.id = 123
     with self.assertRaises(NipapAuthorizationError):
         p.save()
コード例 #2
0
ファイル: nipap-ro.py プロジェクト: scoffers/NIPAPP
 def test_remove_pool(self):
     """ We should NOT be able to execute remove_pool as read-only user
     """
     p = Pool()
     p.id = 0
     with self.assertRaises(NipapAuthorizationError):
         p.remove()