def test_pperm(self): self.obj2.permissions.add('Developer') self.char2.permissions.add('Developer') self.assertEquals(False, lockfuncs.pperm(self.obj2, None, 'Players')) self.assertEquals(True, lockfuncs.pperm(self.char2, None, 'Players')) self.assertEquals(True, lockfuncs.pperm(self.account, None, 'Admins')) self.assertEquals(True, lockfuncs.pperm_above(self.account, None, 'Builders')) self.assertEquals(False, lockfuncs.pperm_above(self.account2, None, 'Admins')) self.assertEquals(True, lockfuncs.pperm_above(self.char2, None, 'Players'))
def test_pperm(self): self.obj2.permissions.add("Developer") self.char2.permissions.add("Developer") self.assertEqual(False, lockfuncs.pperm(self.obj2, None, "Players")) self.assertEqual(True, lockfuncs.pperm(self.char2, None, "Players")) self.assertEqual(True, lockfuncs.pperm(self.account, None, "Admins")) self.assertEqual(True, lockfuncs.pperm_above(self.account, None, "Builders")) self.assertEqual(False, lockfuncs.pperm_above(self.account2, None, "Admins")) self.assertEqual(True, lockfuncs.pperm_above(self.char2, None, "Players"))
def test_pperm(self): self.obj2.permissions.add('Developer') self.char2.permissions.add('Developer') self.assertEqual(False, lockfuncs.pperm(self.obj2, None, 'Players')) self.assertEqual(True, lockfuncs.pperm(self.char2, None, 'Players')) self.assertEqual(True, lockfuncs.pperm(self.account, None, 'Admins')) self.assertEqual(True, lockfuncs.pperm_above(self.account, None, 'Builders')) self.assertEqual(False, lockfuncs.pperm_above(self.account2, None, 'Admins')) self.assertEqual(True, lockfuncs.pperm_above(self.char2, None, 'Players'))