def test_conditional_locks(self):
     self.assertTrue(is_unlocked(self.m,'get_real_name'))
     self.assertTrue(is_locked(self.m,'destroy_world'))
     
     self.assertTrue(is_unlocked(self.m,'get_real_name'), self.user)
     self.assertTrue(is_locked(self.m,'destroy_world'), self.user)
     
     self.assertTrue(is_unlocked(self.m, 'get_real_name'), self.loser)
     self.assertTrue(is_locked(self.m, 'destroy_world'), self.loser)
 def test_permission_locks(self):
     self.assertTrue(is_locked(self.m,'get_name'))
     self.assertTrue(is_locked(self.m,'get_name', self.loser))
     self.assertTrue(is_unlocked(self.m,'get_name', self.user))